git push origin master:refs/heads/next
git co --track origin/next
git co -b newfeat
touch file1.txt && git add file1.txt
git ci -m "Some new stuff"
touch fileA.txt && git add fileA.txt
git ci -m "Another file"
Roll your local changes on top of latest from remote next branch:
git co next
git pull
git co fewfeat
git rebase next
Interactive rebase - Flatten local commits:
git rebase -i next
In editor, squash all commits into first:
pick bbg4e3e Some new stuff
squash 7yas3d4 Another file
Editor reopens, write up an apropriate commit message:
[#44] New Feature
* Did dome new stuff
* Added another file (it was needed!)
Merge feature branch into next, push it to server, then delete the local branch
git co next
git merge newfeat
git push origin next
git br -d newfeat
Merge next into master
git co master
git merge next
Tag release
git tag 0.0.1
Push to server
git push
git push --tags
- Fix on master
- Tag as patch release
- Push to server
- Merge change into next
Learned from http://www.joslynesser.com/blog/archives/2010/09/06/git-workflow-for-small-teams/