Skip to content

Commit

Permalink
fetch original repository before use
Browse files Browse the repository at this point in the history
  • Loading branch information
aollier committed Dec 16, 2020
1 parent 1882031 commit 946d128
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions book/06-github/sections/2-contributing.asc
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,16 @@ You can automate this work with a bit of configuration:
[source,console]
----
$ git remote add progit https://github.com/progit/progit2.git <1>
$ git branch --set-upstream-to=progit/master master <2>
$ git config --local remote.pushDefault origin <3>
$ git fetch progit <2>
$ git branch --set-upstream-to=progit/master master <3>
$ git config --local remote.pushDefault origin <4>
----

<1> Add the source repository and give it a name.
Here, I have chosen to call it `progit`.
<2> Set your `master` branch to fetch from the `progit` remote.
<3> Define the default push repository to `origin`.
<2> Get a reference on progit's branches, in particular `master`.
<3> Set your `master` branch to fetch from the `progit` remote.
<4> Define the default push repository to `origin`.

Once this is done, the workflow becomes much simpler:

Expand Down

0 comments on commit 946d128

Please sign in to comment.