Skip to content

Commit 946d128

Browse files
committed
fetch original repository before use
1 parent 1882031 commit 946d128

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

book/06-github/sections/2-contributing.asc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,16 @@ You can automate this work with a bit of configuration:
521521
[source,console]
522522
----
523523
$ git remote add progit https://github.com/progit/progit2.git <1>
524-
$ git branch --set-upstream-to=progit/master master <2>
525-
$ git config --local remote.pushDefault origin <3>
524+
$ git fetch progit <2>
525+
$ git branch --set-upstream-to=progit/master master <3>
526+
$ git config --local remote.pushDefault origin <4>
526527
----
527528

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

533535
Once this is done, the workflow becomes much simpler:
534536

0 commit comments

Comments
 (0)