Tiny tips: Git merge without commit

This is one of the “Tiny tips” series.
The purpose is to share little pieces of helpful practices and tricks that will make your work better and more pleasant.

Take a look at the other tiny tips like Automate your environment, Use cheat sheets.

Most of the time when I am merging from another branch I don’t want all the stuff to go in the background. What I need to do is to go through the merged files, review them and do a quick smoke test of the app before committing the merge and mark it as a not risky one.

And if I use Visual Studio or another IDE with integrated Git capabilities then the merging is automatically committed.

To overcome that you can merge with the other branch by executing the following command:

$ git merge <branc-name> --no-commit --no-ff


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s