a lot what Antonio described is setup work. Once your remote etc is configured its a very quick process.

1) switch to master and pull from the apache netbeans repo

2) create a fresh branch from that

3) add commits

4) push to your clone, press the create PR button


If you don't use one branch per PR, you will only be able to work on one thing at a time and if you don't get reviewers you are stuck waiting in line.

-mbien


On 14.04.22 22:37, Łukasz Bownik wrote:
Gee... it looks like a lot of work every time I submit a little PR to a
module nobody else is working on. How about I continue with my current
private branch until i change a module I work on or get conflists with
master?

On Thu, Apr 14, 2022, 1:28 PM antonio <[email protected]> wrote:

Hi,

So you have forked the NetBeans repository at
https://github.com/lbownik/netbeans, and you've cloned it to a directory
in your laptop using "git clone", or something similar.

This means that your clone (in your laptop) has a "remote" pointing to
your repository.

This "remote" is usually called "origin" by default. If you run "git
remote -v" (to see the remotes) you should see something like:

----
$ git remote -v
origin  [email protected]:lbownik/netbeans.git (fetch)
origin  [email protected]:lbownik/netbeans.git (push)
----

With git you can have different remotes. We usually create another
remote (let's call it "upstream", but you can call it as you want)
pointing to Apache NetBeans directly:

----
git remote add upstream https://github.com/apache/netbeans.git
----

Now if you list the remotes again you'll see something like:

----
$ git remote -v
origin  [email protected]:lbownik/netbeans.git (fetch)
origin  [email protected]:lbownik/netbeans.git (push)
upstream        https://github.com/apache/netbeans.git (fetch)
upstream        https://github.com/apache/netbeans.git (push)
----

After one PR is merged to master you want to synchronize the "master"
branch in [email protected]:lbownik/netbeans.git with the "master" branch
in https://github.com/apache/netbeans.git. You do this as follows:

----
$ git fetch --all # fetches changes from all remotes
$ git checkout master # You move to _your_ master barnch
$ git merge upstream/master # You incorporate the changes from NetBeans
$ git push origin master # You update _your_ master branch
----

Now _your_ master branch (in your repo) is synchronized with NetBeans'
master branch.

You now want to create some other patch, you usually do that in a new
branch, branching from your updated master, like so:

----
$ git checkout master
$ git checkout -b the-name-of-your-branch
----

And you create new commits or whatever in 'the-name-of-your-branch', You
then submit your PR as usual.

HTH,
Antonio





El 14/4/22 a las 21:58, Łukasz Bownik escribió:
Can I continue development on my branch or shall i create new branch for
each pull request?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to