You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up to 3275991. All shell output that were not updated
with that commit get updated with this pull request.
Please close this if those `[source,shell]` were unchanged on purpose.
Copy file name to clipboardExpand all lines: book/06-github/sections/2-contributing.asc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ The only problem is that the blinking rate is too fast, we think it's much nicer
58
58
59
59
First, we click the 'Fork' button as mentioned earlier to get our own copy of the project. Our user name here is ``tonychacon'' so our copy of this project is at `https://github.com/tonychacon/blink` and that's where we can edit it. We will clone it locally, create a topic branch, make the code change and finally push that change back up to GitHub.
@@ -201,7 +201,7 @@ If you want to merge in the target branch to make your Pull Request mergeable, y
201
201
202
202
For example, let's say that in the ``tonychacon'' example we were using before, the original author made a change that would create a conflict in the Pull Request. Let's go through those steps.
Copy file name to clipboardExpand all lines: book/06-github/sections/3-maintaining.asc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ If you notice the line that says `git pull <url> patch-1`, this is a simple way
77
77
78
78
The other interesting URLs are the `.diff` and `.patch` URLs, which as you may guess, provide unified diff and patch versions of the Pull Request. You could technically merge in the Pull Request work with something like this:
79
79
80
-
[source,shell]
80
+
[source,console]
81
81
----
82
82
$ curl http://github.com/tonychacon/fade/pull/1.patch | git am
83
83
----
@@ -112,7 +112,7 @@ To demonstrate this, we're going to use a low-level command (often referred to a
112
112
113
113
If we run this command against the ``blink'' repository we were using earlier, we will get a list of all the branches and tags and other references in the repository.
114
114
115
-
[source,shell]
115
+
[source,console]
116
116
----
117
117
$ git ls-remote https://github.com/schacon/blink
118
118
10d539600d86723087810ec636870a504f4fee4d HEAD
@@ -133,7 +133,7 @@ There are two references per Pull Request - the one that ends in `/head` points
133
133
134
134
Now, you could do something like fetching the reference directly.
135
135
136
-
[source,shell]
136
+
[source,console]
137
137
----
138
138
$ git fetch origin refs/pull/958/head
139
139
From https://github.com/libgit2/libgit2
@@ -170,7 +170,7 @@ You can modify this section to add another refspec:
170
170
That last line tells Git, ``All the refs that look like `refs/pull/123/head` should be stored locally like `refs/remotes/origin/pr/123`.''
171
171
Now, if you save that file, and do a `git fetch`:
172
172
173
-
[source,shell]
173
+
[source,console]
174
174
----
175
175
$ git fetch
176
176
# …
@@ -183,7 +183,7 @@ $ git fetch
183
183
Now all of the remote pull requests are represented locally with refs that act much like tracking branches; they're read-only, and they update when you do a fetch.
184
184
This makes it super easy to try the code from a pull request locally:
0 commit comments