Two solutions that you can use are no longer mentioned: use the topic branch or use the cherry picker .
Branch Branch Solution
In the decision section of the branch , you switch to the "something" branch, create a branch to fix the error, for example. "something-bugfix", merge this branch into "something" (bug fix), and then merge this branch into "experimental".
$ git checkout -b something-fix something [edit, commit] $ git checkout something $ git merge something-fix $ git checkout experimental $ git merge something-fix [fix conflicts if necessary and commit]
See also Resolving conflicts / dependencies between branches earlier and Never merge backwards , and maybe also Fix blog posts from Unio C Hamano (git maintainer) in another thread .
Cherry-picking bugfix error
The cherry picking solution is useful if you later noticed that the fix you created (for example, in development branches) would also be useful on another branch (for example, stable branch). In your case, you will send the fix to the "something" branch:
$ git checkout something [edit, edit, edit] $ git commit $ git checkout experimental
Then you noticed that the patch that you posted in the something branch should also be on the experise branch. Suppose that this fix was fixed with "A" (for example, "something" if you did nothing on top of "something", but it could be, for example, "something" 2 or "c84fb911"):
$ git checkout experimental $ git cherry-pick A
(you can use the --edit option for git cherry-pick if you want to edit the commit message before proceeding with the error received with the cherry).
Jakub NarÄbski Aug 27 '09 at 10:21 2009-08-27 10:21
source share