Git Commands

Merge Commands

Merge a remote branch using git merge trunk after checking out your feature branch

Check before merging

Suppose you have a feature branch and you want to merge changes from trunk. Before that it might a good idea to check if there are any conflicts. The below command will merge but not commit.

git merge --no-commit --no-ff <Branch Name>

Before using this, make sure your local trunk branch is updated and then checkout your feature branch. Use below steps to do so

git checkout feature-branch && git pull origin

git checkout trunk && git pull origin

git checkout feature-branch

Abort merge

git merge --abort

Last updated

Was this helpful?