I've got a trunk setup where all my production code goes.
Then I have a debug
branch (parent is trunk
) which I add debugging code such as logging, var dumps, etc... this should never be in production. This branch rarely changes.
Lastly I have a feature
branch (parent is debug
) where I do all my coding with the benefits of debugging. There are constant commits to this branch.
I just want to know if there is an easier way to move my feature
code to the trunk
. This is what I currently do:
feature
branchmaster
and git svn rebase
changes from other devs.rebase
my feature
branch onto the master
branch (git rebase --onto master debug feature
)merge
feature to master
git svn dcommit
changes to other devsrebase
debug
to master
(git rebase master debug
)feature
branchfeature
from the debug
branch.I would say that your work-flow is pretty optimal. I would consider cherry-picking to be an overkill (but it depends on the number of commits).
What you could do is squash all the commits into one and cherry-pick/rebase just this one.
And btw, why just don't write a simple script if it is something you do all the time? Git is a bit low level tool, so writing extra scripts to help with repetitive tasks is a very good idea.
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