... | ... | @@ -89,14 +89,23 @@ git push -u origin <my-dev-branch> |
|
|
|
|
|
|
|
|
#### D3.
|
|
|
It is good practice to keep your development branch up to date with its parent branch (and to keep your parent branch up to date with its upstream branch, see D1). Please create a separate commit when you update your development branch to keep your development commits and the update commits separated (as shown below) - this helps read the history at some point later.
|
|
|
Keeping your development branch up to date.
|
|
|
|
|
|
If you dont need to it is simplest to not update your development branch. This will avoid extra merge commits if the merge request is automatically merged into the next branch.
|
|
|
|
|
|
If you need to, here is how to do it:
|
|
|
|
|
|
1)
|
|
|
```
|
|
|
git checkout <my-dev-branch>
|
|
|
git merge --no-ff <parent-branch>
|
|
|
git add .
|
|
|
git commit
|
|
|
git push -u origin <my-dev-branch>
|
|
|
#update the master and next branches on your fork with the upstream branches
|
|
|
current_branch=$(git rev-parse --abbrev-ref HEAD); for branch in master next; do git checkout $branch && git pull upstream $branch;git push -u origin $branch; git checkout $current_branch; done;
|
|
|
|
|
|
#update your development branch
|
|
|
git checkout <my-dev-branch>
|
|
|
git merge --no-ff <parent-branch>
|
|
|
git add .
|
|
|
git commit
|
|
|
git push -u origin <my-dev-branch>
|
|
|
```
|
|
|
See technical note about `git add` [here](/contributing/Useful-git-technical-information#git-add)
|
|
|
|
... | ... | |