Articles → GIT → merge command in git

merge command in git






Purpose





Syntax






git checkout <target branch>




Git merge <source branch>



Example




BranchOperationAfter merge with other branch
MasterCreate an empty text file 1.txtAn empty text file 1.txt is created in dev.
MasterText added in 1.txtSame text will be added in dev. Branch.
Dev.1. Change in 1.txt

2. Created 2.txt
1. Changes of 1.txt will be overridden.
2.2.txt gets created.
DevDelete 1.txtFile gets deleted in master branch as well.



What will happen to untracked and files in staging area?







Posted By  -  Karan Gupta
 
Posted On  -  Friday, August 02, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250