Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
git commit -a -m "commit message" |
Push Push commits upstream
After committing the changes into the local repository they have to be pushed upstream to make them available for the other developers.
...
Code Block | ||||
---|---|---|---|---|
| ||||
git fetch origin git rebase -p origin |
Resolving Conflicts
If the local commits and the commits from upstream will modify the same line in the same file, this will result in a merge conflict .
Info |
---|
NOTE: We are still not confident in the usage of "rebase" below. There was one instance where we (weninc/cpo) ended up losing files. Maybe safer to use "pull". |
This conflict can be resolved in two different ways:
...
The conflict can be resolved by ignoring the local changes and using the version of the file from upstream
Code Block | ||||
---|---|---|---|---|
| ||||
git rebase --skip
|
This will overwrite your local changes with the upstream changes.
...
reported by the above rebase command.
It is simplest to resolve the conflict manually. The command "git diff" will show the lines that were changed locally and by the upstream version. This file can now be added to keep whatever part of the local or remote change you want.
After the merge conflict is resolved commit your changes
Code Block | ||||
---|---|---|---|---|
| ||||
git commit -a -m "commit message"
|
And then continue with the rebase and push everything upstream
Code Block | ||||
---|---|---|---|---|
| ||||
git rebase --continue
git push origin master |
Tag new release
To create a new release from the current version of the local repository and push it upstream do:
...