My Merging Strategy
This is my current merging strategy and workflow. I have the branch mcotton-next
and when I make new features I git checkout -b mcotton-branch-name
As I make changes I make incremental commits and run grunt. I use this command grunt && git status -s|awk '{ print $2 }'|xargs git add; git commit -m "<commit message>" && git push stage mcotton-branch-name
Because I make a lot of little commits I use git merge mcotton-branch-name --squash
so that I can make my own commit with a unified message.
After that I merge it to next and push to the next remote. git merge mcotton-next
git push origin next
git push next next
Once everything is tested and looks good, we git merge next
into master, create a new tag git tag <data>
, git push origin master --tags
and then git push prod master --tags
and git push prev master --tags
.
After that I remote to prod and prev and do a git pull --all
then git checkout <date>