What is Git Merge?

Merge is a command used in Git to move the changes in branch to another. Usually, the new features are developed in the dev branch and merged into the master branch after finishing the development. All the changes in the dev branch is added to the master branch on the merge. but the dev branch will be unaffected.

— merge pic —

How to do a Git Merge

Let’s do a Git Merge step by step to understand how it works. Except the merging part, many steps from cloning the repo to publishing the changes will be the same as in Git Rebase Tutorial because we are trying to do the same thing in a different way.

Step 1: Fork and clone the desired repo

Let’s reuse our rebase-demo repository for this. Go to https://github.com/kdanW/rebase-workflow-demo and click the button ‘Fork’ in the top right-hand corner. Now go to your forked repo, click ‘Clone or Download’ button and copy the link shown.

Image for post

Now go to a directory of your preference and type the following command on the terminal to download the repo into your local PC.

git clone https://github.com/<YOUR_USERNAME>/rebase-workflow-demo

#git-merge #git-workflow #github #merge #git

Git Merge: A Git Workflow explained 
1.45 GEEK