Skip to content

Commit 12331c6

Browse files
author
Ben Grynhaus
committed
Merge branch 'master' into next
2 parents 34b2954 + c6ba7c3 commit 12331c6

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,55 @@ You can look through the issues (which should be up-to-date on who is working on
3030
[ard-demo]: https://benfeely.github.io/angular-react/demo
3131
[getting-started]: https://benfeely.github.io/angular-react/docs/getting-started
3232
[fab]: https://developer.microsoft.com/en-us/fabric
33+
34+
### Pull Requests
35+
See: https://gist.github.com/piscisaureus/3342247
36+
Locate the section for your github remote in the `.git/config` file. It looks like this:
37+
38+
```
39+
[remote "origin"]
40+
fetch = +refs/heads/*:refs/remotes/origin/*
41+
url = git@github.com:joyent/node.git
42+
```
43+
44+
Now add the line `fetch = +refs/pull/*/head:refs/remotes/origin/pr/*` to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
45+
46+
```
47+
[remote "origin"]
48+
fetch = +refs/heads/*:refs/remotes/origin/*
49+
url = git@github.com:joyent/node.git
50+
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
51+
```
52+
53+
Now fetch all the pull requests:
54+
55+
```
56+
$ git fetch origin
57+
From github.com:joyent/node
58+
* [new ref] refs/pull/1000/head -> origin/pr/1000
59+
* [new ref] refs/pull/1002/head -> origin/pr/1002
60+
* [new ref] refs/pull/1004/head -> origin/pr/1004
61+
* [new ref] refs/pull/1009/head -> origin/pr/1009
62+
...
63+
```
64+
65+
To check out a particular pull request:
66+
67+
```
68+
$ git checkout pr/999
69+
Branch pr/999 set up to track remote branch pr/999 from origin.
70+
Switched to a new branch 'pr/999'
71+
```
72+
73+
To get latest changes to the PR:
74+
75+
```
76+
$ git pull --tags origin refs/pull/1000/head
77+
From https://github.com/benfeely/angular-react
78+
* branch refs/pull/1000/head -> FETCH_HEAD
79+
Updating aab92e2..2896b73
80+
Fast-forward
81+
...
82+
```
83+
84+
Note: "git pull" did not work for me by itself for the PR branch... Perhaps "git pull origin".

0 commit comments

Comments
 (0)