Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Suppose that I have several shared branches on my Git repository, for example: newfeature, experiment and gtkgui, and I share those branches in the origin repository. My team and I make some changes on all branches and push those changes into the origin repository. Later I detect a minor bug on the core code, I fix it and commit it to the master branch.

I need this fix to be available on the other three branches. What is the best way to do this? Do I need to merge the master branch into the other branches one by one and push them? Could git rebase help me?

share|improve this question

1 Answer 1

The two solutions are topic branch and cherry-picking:
See "Git & Working on multiple branches".

Now I really don't recommend cherry-picking, which in your case would mean duplicating a set of commits all over the place (i.e. in different branches).

So as long as you make changes from the oldest branch that needs them, and merge forward, you are on the right track.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.