It's only the setup which requires slightly more configuration than usual.

The best practice is keep each PR in it's own branch. It is also possible that your PR-s are not accepted/merged in that order you are popping them out, so having them on one branch could be difficult. I check out the apache/netbeans as "origin" and my fork as "mine". Pushing the branches on "mine" then creating a PR via the github provided link.

On 4/14/22 13: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 <anto...@vieiro.net> 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  g...@github.com:lbownik/netbeans.git (fetch)
origin  g...@github.com: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  g...@github.com:lbownik/netbeans.git (fetch)
origin  g...@github.com: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 g...@github.com: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: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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



Reply via email to