git merge branch a to branch b code example
Example 1: git merge branch a to branch b
git checkout b # b is checked out (b could be master for exampel)
git pull # update local b
git merge a # merge branch a into b
git push # b changes on remote.
Example 2: how to merge a branch into another branch
git checkout YourBranch
git merge develop
Example 3: merge two branches git
# merge two branches
1] you should be on MainBranch -- git checkout MainBranch
2] then run merge command -- git merge SubBranch