new git user here. I want to use git, but i'm in an SVN environment. From some books I've read and some simple experimenting, I've hit some troubling pitfalls and am hoping to get clarification on how to get starting without my colleagues wanting to kill me.
I want my workflow to be:
a master git branch that stays in step with svn's trunk.
local git branches that i do my feature and bug work in.
I want to frequently bring the feature branches up to date with master.
When i'm ready I want to merge a feature branch in with master and commit that back to svn.
Is this a typical workflow?
Initially I was using git merge to merge my master branch and feature branches. This led to all kinds of conflicts and problems. I later read to avoid using git merge alltogether and stick with git rebase. Would the following git commands, then, be correct?
- git svn rebase (to pull down latest changes to master)
- git checkout -b myAwesomeFeature (to make a feature branch to work on)
- ... do some work, make commits to my feature branch
- <<< TIME GOES BY >>>
- git checkout master
- git svn rebase (to pull down new stuff)
- git checkout myAwesomeFeature
- git rebase master ( to get svn trunk's stuff into my feature branch)
- <<< READY TO PUSH MY FEATURE BRANCH >>>
- git checkout master
- git rebase myAwesomeFeature (to fast forward masters head to get my feature stuff in)
- git svn dcommit (to finally publish)
Any advice or suggestions to help an aspiring git user live in an svn world would be really appreciated. Thanks