Additional commands during feature development - lecturio/workflows GitHub Wiki
Those commands are not part from the workflow script. You need to use them when you need to update branches with new changes.
git pull --rebase origin master
git pull --rebase origin staging
git pull --rebase origin XXX-FEATURE
Before update feature branch
with master
you need to update latest changes from remote feature branch
to your local feature branch
.
git pull --rebase origin XXX-FEATURE
After this you can rebase
master to your feature branch:
git checkout XXX-FEATURE
git pull --rebase origin master
Resolved conflicts - use git rebase --continue
, git add/ git rm
or git rebase --abort
to start over.
You need to resolved conflicts (if any) and push to remote branch.
If you have diverged
message info on git status
you can't pull from remote feature branch
.
Using following commands is Forbidden after rebase to master
.
git merge origin/XXX-FEATURE #FORBIDDEN
git pull origin XXX-FEATURE #FORBIDDEN
Instead push your changes with force option to feature branch.
git push origin XXX-FEATURE -f
During this time other people shouldn't not push to remote feature branch.
Remote feature branch is locked
Update feature branch with master detail flow
Pull rebase from feature branch to your local branch
Push (if any) local changes to remote
Feature branch is locked for other team members
Rebase to master
Resolved conflicts
Push to remote feature branch with force option
Feature branch is unlocked for other team members
Do not use git merge
. Workflow
can't work with that command.
Problems will occur on multiple sync to staging branch after rebase feature branch to master.