> For the complete documentation index, see [llms.txt](https://sauravv.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sauravv.gitbook.io/workspace/git-commands.md).

# Git Commands

#### Merge Commands <a href="#merge-commands" id="merge-commands"></a>

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`
