Thursday, April 7, 2016

Change Editor for Git Commit Messages

Git is a very powerful tool especially when used from a console. Obviously committing changes is a pretty common task which includes editing commit messages. If a message is short it is easy to specify it via -m option:
$ git commit -m "my commit message"
But what if you have a long list of changes and you need a descriptive well-formatted commit message? It would be cool to write it in your favorite text editor, wouldn't it? Is there a way to tell Git which editor to use? Yes, it is. According to the docs for git-commit:

"The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment variable, or the EDITOR environment variable (in that order)."

I'm a Vim fan and I stick to the core.editor configuration variable. So, here is my preferred way to configure commit message editor:
$ git config --global core.editor "vim"
Now I can omit -m option and enjoy editing commit messages in Vim :)

24 comments:

  1. Indeed, It is astonishing knowledge for a man to appreciate the houseboat encounter and should not be missed. It is a heaven in the "Divine beings claim Country". Allepy called the "Venice of East" is the place that is known for backwater and tidal ponds in kerala is acclaimed for its regular magnificence. Tasty kerala sustenance furnished with in the houseboat is an extra as well. Inns at shoddy rates are there around the vessel wharf, where individuals can have simple sustenance including different fish fries alongside custard .

    ref : thesis writing service

    ReplyDelete
  2. Madhuvahini Houseboat Service is the new initiative being launched by Malabar tourism management @ Bekal, Nileshwar, Kasaragod, Kannur, Calicut, Manglore. 1HR, 2HR, Sunset, Dinner, Overnight, Day Night Cruise Available. Life is Better on Boats to explore the area of backwaters and offer Kerala traditional Home and Boat Stay Service.

    ReplyDelete
  3. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.


    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

    ReplyDelete
  4. KeralaBoatStay::Explore your boating experience!Houseboats complement Kerala's backwater beauty and are an inseparable part of it. When in Kerala, one cannot and should not avoid the exquisite food choices and stay options at these houseboats. Bringing a wide range of meaningful packages and opening a gateway to this enticing tourism platform, KeralaBoatStay is becoming the most trusted partner in this field.

    ReplyDelete
  5. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.

    Tableau Training in Chennai
    Tableau Training

    ReplyDelete
  6. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. R Programming Course Fees

    ReplyDelete
  7. Great blog.Well explained.This was really informative and helpful.Thank you for shared.keep update..check it also hadoop training in chennai velachery
    hadoop training course fees in chennai
    Hadoop Training in Chennai Omr

    ReplyDelete
  8. You have provided a nice article, Thank you very much for this one. And I hope this will be useful for many people. And I am waiting for your next post keep on updating these kinds of knowledgeable things
    RPA Training in Chennai
    Selenium Training in Chennai
    Robotic Process Automation Certification
    RPA Training
    Software testing selenium training
    Selenium testing training

    ReplyDelete
  9. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.
    Good discussion.
    Hadoop Training in Chennai
    CCNA Training in Chennai
    Big Data Training near me
    Big Data Course in Chennai
    CCNA course in Chennai
    CCNA Training institute in Chennai

    ReplyDelete
  10. Thanks For sharing such a wonderful Blog on RPA. This blog contains so much of data about RPA that anyone who is searching for RPA, its really helpful for them to grab this data from your blog on RPA. Again thank you so much for your blog on RPA.
    Thanks and Regards,
    blue prism training in chennai
    Best blue prism training in chennai
    blue prism training cost in chennai

    ReplyDelete