Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two branches with the following files in there:

branch a:


branch b:


I want to merge them, so that I get both files from a and b (and files that exist in both should normally be merged)! is that possbile?

share|improve this question
Why don't you simply get both branches and merge them manually? – Ramhound Sep 27 '11 at 16:48
clone two times and copy and add? – reox Sep 27 '11 at 16:55
You migt want to ask this over on StackOverflow... programmers over there might know more about this stuff. – cwheeler33 Sep 27 '11 at 18:32
up vote 16 down vote accepted

this might help:

in your case you would do the following:

  • git checkout a (you will switch to branch a)
  • git merge b (this will merge all changes from branch b into branch a)
  • git commit -a (this will commit your changes)

take a look at above link to get the full picture.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .