Write your commit message in your favourite text editor

Most of us use git as their version control system and in day to day life while developing any application we commit our changes quite frequently. We follow the traditional way of committing changes like below –

$ git commit -m "Our commit message"

But we have another cool option to do this commit. We can use our favorite text editor for this commit. We have to first tell git that pop up the text editor every time you commit changes. For this execute below command in your terminal –

$ git config --global core.editor "vim"

Here it will pop up the vim text editor when you will execute git commit.

Thank you 🙂

One thought on “Write your commit message in your favourite text editor

  1. Pingback: Homepage

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s