6/24/2015 - 5:24 AM



Create new branch from master
git checkout master
git pull
git status                         // double check you're on master!!!
git checkout -b <featurebranch>    // same as git branch, then git checkout

Check if feature branch is out of sync with master branch
git rev-list --left-right --count origin/master...<featurebranch>

If first number is greater than zero, merge master branch into feature branch.
git checkout master
git pull
git checkout <featurebranch>
git merge master
git push

Note: git merge master will prompt you for a commit message. Use the default message of “Merge branch ‘master’ into <featurebranch>”. Enter :wq to continue.

Commit changes
git add --all
git commit -a -m “My comment”
git push

Change “My comment” to the name of the Teamwork task and any other simple details needed.

Merge feature branch to test branch
git checkout test
git pull
git merge <featurebranch>
git push