Показаны сообщения с ярлыком vcs. Показать все сообщения
Показаны сообщения с ярлыком vcs. Показать все сообщения

среда, 11 января 2012 г.

GIT - working on a side branch

It is best to work on a side branch and follow the “merge master/merge side” delivery procedure.  The overall flow is defined here:
Here is refined set of commands, which details branch switch, and substitutes rebases on the side branch instead of merges:

1. Starting on local master, update from remote master then create a side branch

git pull origin
git checkout -b JIRA-1122 origin/master
2. Now on side branch named JIRA-1122

git commit -m "blah"
git pull --rebase origin/master
Notice that I’ve told it to rebase

3. Back to local master branch

git checkout master
git pull origin
This updates your local master to mirror what the upstream master looks like.
 4.

git merge JIRA-1122
Your changes are merged onto master not the other way around: 
git push origin master

5. You may now throw away the side branch.

git branch -d JIRA-1122