merge - Merging 2 branches together in GIT -


I have just started using GIT and started wondering about it, although I am a little suspicious merge commands.

Let us know that we have a working project in branch "A".

I go home and make changes in this branch and protects it "B" as another programmer changes "A" and saves it as "C".

Is the two branches one way to merge "B" and "C" together, then make changes as a new branch, say "D"?

Or missing the 'merge' point?

A short example:

  # On the branch #: Create new branch B $ git checkout - BB # hack hack $ git commit- "Commodity on branch B1" Make # $ git create new branch of B from checkout C # hack hack $ git commit -am "branch Command on C "Back to the branch A $ git Checkout A # Hack hack $ git at least" Commitment at branch A " 

So now there are three separate branches with different branches (I.e. AB and C)

change from B and C A, checkout A (already To make changes in this example) and then use the merge command:

  # create an octopus merge $ Git merged BC  

Then your history will look something like this:

  ... -oox ------- A | / / | | B --- / | \ / C --- /  

If you want to merge into repositories / computer boundaries, take a look at the git pull command, e.g. From PC with branch A (this example will create two new commands):

  # bridge branch B $ git ssh: // host / ... B # pull branch C $ git ssh : // host / ... C  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -