@@ -25,9 +25,12 @@ repo or just head straight to the command line:
25
25
26
26
``` shell
27
27
# Clone your fork to your local machine
28
- git clone
[email protected] :USERNAME/Paddle.git
28
+ git clone https://github.com/USERNAME/Paddle.git
29
+ ```
30
+ Then you can start to develop by making a local developement branch
31
+ ``` shell
32
+ git checkout -b MY_COOL_STUFF_BRANCH origin/master
29
33
```
30
- Then you can start to develop.
31
34
32
35
## Commit
33
36
@@ -45,7 +48,7 @@ are the details if any.
45
48
46
49
## Keeping Fork Up to Date
47
50
48
- Before pull your request, you shold sync you code from the latest PaddlePaddle.
51
+ Before pull your request, you should sync your code from the latest PaddlePaddle.
49
52
To do this, you'll need to add a remote at first:
50
53
51
54
``` shell
@@ -60,8 +63,7 @@ git remote -v
60
63
Update your fork with the latest upstream changes:
61
64
62
65
``` shell
63
- git fetch upstream
64
- git pull upstream master
66
+ git pull --rebase upstream HEAD
65
67
```
66
68
67
69
If there are no unique commits locally, git will simply perform a fast-forward.
@@ -74,10 +76,26 @@ Now, your local master branch is up-to-date with everything modified upstream.
74
76
75
77
``` shell
76
78
# push to your repository in Github
77
- git push origin master
79
+ git push origin HEAD
78
80
```
79
81
80
82
## Pull Request
81
83
82
84
Go to the page for your fork on GitHub, select your development branch,
83
85
and click the ** pull request button** .
86
+
87
+ ## Update your pull request with the lastest version
88
+
89
+ During the code review, your pull request may become stale because new commits in
90
+ baidu/Paddle. GitHub allows autmotic update if there is no conflict. You can do this
91
+ by clicking the "Update Branch" button in your pull request page. However, in the case
92
+ of conflict, you need to do the update manually. You need to do the following on
93
+ your local repository:
94
+ ``` shell
95
+ git checkout MY_COOL_STUFF_BRANCH
96
+ git pull --rebase upstream HEAD
97
+ # You may need to resolve the conflict according to the git prompt.
98
+ # Make and test your code.
99
+ git push -f origin HEAD
100
+ ```
101
+ Now your Pull Request is updated with the latest version.
0 commit comments