domingo, 6 de diciembre de 2020

GIT Demystifying part 11, Branch & Merge

GIT Demystifying part 11

Branch & Merge

Doing a merge with a tree like "Y" without data files.
Doing a merge with a tree like "Y" with data files.
To Undo the Merge.
See the effect of apply merge over the opposite branch.




Doing a merge with a tree like "Y" without data files.

command line procedure


f


Redoing the tree, but merging from master the branch, the same result.


Doing a merge with a tree like "Y" with data files.

Create a tree with one branch, one file on commit 1, and two files on the other commits.





Command line procedure


2


3


To Undo the Merge 

Now apply de command 

git reset --hard (address of commit2 "c2")

This operation set HEAD and branch master on c2, exaclty as before merge.


The content of files are as previous the merge.


See the effect of apply merge over the opposite branch

Lets checkout the branch_01 and merge master, and see the effect. for short, this will order the lines on conflict in alternate order. this mean, first the line of branch_01 followed by line of master. And set the HEAD on branch_01, where originally where called the merge.

command line procedure.


And finally to finish the merge, do the commit.




eot

No hay comentarios:

Publicar un comentario