I am used to having one main branch (master) and working in topic branches. But I'm working on a project now with two main branches (master and experimental) and I am unsure how to best merge my topic branch into both?
Is this the right way to do it? If not can someone let me know the right way.
(master)$ git checkout -b bugfix
# do bug fix here
(bugfix)$ git commit -a -m 'Fixed bug.'
(bugfix)$ git checkout master
(master)$ git merge bugfix
(master)$ git checkout bugfix
(bugfix)$ git rebase experimental
(bugfix)$ git checkout experimental
(experimental)$ git merge bugfix
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…