4 ms·
Its good to know that my 'feature development' git flow would make sure that this bug would be avoided or at the very least easily worked around. My favorite g
by codenerdz 15y ago
Its good to know that my 'feature development' git flow would make sure that this bug would be avoided or at the very least easily worked around.
My favorite git flow in 143 easy to remember steps
1) git checkout -b MyFeatureBranch # create a feature branch
2) Code/Hack/Fall Asleep on Keyboard
3) git commit -am "Wow finally done with this tiny feature"
4) Go back to to 2 if needed
5) git checkout master
6) git pull # get all the latest changes
7) git checkout MyFeatureBranch
8) git rebase -i # squash commit comments if neccessary
9) Fix merge conflicts, git add, then git rebase --continue
10) git checkout master
11) git merge MyFeatureBranch
12) git push
13) PROFIT!!!
This is borrowed from http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-te...
- diab0lic 15y agoNot to mention this "microcommit" approach in your feature branch allows you a fine level of control over your working branch without polluting the master branch (because of the squash). We use this one at work, and I do on my own personal projects as well. Never have I been happier with a VCS than I am with git after moving to this workflow.
- mainguy 15y agoYou can simplify this (unless you have a master who merges your features by simply doing): code/hack git commit -am 'did stuff' repeat git fetch origin master git rebase -i -p origin/master git push
- cpeterso 15y agoSo you never commit on master, only pull (fast-forward merge) from origin/master and merge from your feature branch? Does merging your squashed commit from MyFeatureBranch to master commit a merge record or is it always fast-forward?