Open your Terminal or Command Prompt and navigate to the Repository containing the branch you would like to merge.
2
Type "git branch [[Enter]]" to display a list of all branches. You'll have to switch to the branch you want to merge into to successfully merge. To do this, enter the following commands:
3
Type "git add _a [[Enter]]" to add a branch to the staging area.
4
Type "git commit -m "commit message" [[Enter]]" To add the commit message.
5
Type "git checkout main [[Enter]]" To run a Git Checkout to switch to your main branch.
6
If the branch you would like to merge is behind your main branch, you'll need to do a fast-forward to catch up. To do this, Type "git pull [[Enter]]"
7
Now, you can merge your branch into the main branch. Simply type "git merge second-branch [[Enter]]"