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?
Any advice or suggestions to help an aspiring git user live in an svn world would be really appreciated. Thanks
Your workflow is about the same I have. It is good enough if you are only committing to the svn trunk. It gets complicated when you commit to multiple svn branches where rebase not only merges the contents, but also changes the pointed-to svn branch, in which case, you can only git cherry-pick
when you need commits into one svn branch targeting git branch in another, as discussed here: Overcome git svn caveats
It is also worth understanding that SVN's inability to handle non-linear history and that git merge can't be used with it: git svn workflow - feature branches and merge
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With