The git merge command lets you take the independent lines of development created by git branch and integrate them into a single branch.Note that all of the commands presented below merge into the current branch. The current branch will be updated to reflect the merge, but the target branch will be completely unaffected. Again, this means that git merge is often used in conjunction with git checkout for selecting the current branch and git branch -d for deleting the obsolete target branch.

#Merge the specified branch into the current branch. Git will determine the merge algorithm automatically
git merge 

#Merge the specified branch into the current branch, but always generate a merge commit (even if it was a fast-forward merge). This is useful for documenting all merges that occur in your repository.
git merge --no-ff 

Leave a Reply

Your email address will not be published. Required fields are marked *