Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:11:09+00:00 2026-05-29T08:11:09+00:00

I am in the middle of committing. I have typed up my commit message

  • 0

I am in the middle of committing. I have typed up my commit message in vim. I now remembered I needed to change something. I realize that there are other options to accomplish what I want, but I want to know if there is a way to abort the commit but still save the commit message I’ve typed up so far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:11:10+00:00Added an answer on May 29, 2026 at 8:11 am

    Yes. Write the commit message to a different file (:w /some/other/path.txt). Then exit the editor without saving (:q!). If you previously saved the file to its original path, delete everything and write the empty file first (an empty commit message will abort the commit).

    Now, when you’re ready to commit “for reals”, use the message file you saved at the alternate path.

    Alternately, copy the commit message into one of vim’s buffers.

    It’s worth noting that you really don’t have to do this at all: commit --amend lets you alter the commit after it’s made, so the easy solution is to produce the commit with what you’ve got and then fix it before pushing. You can even just finish the commit in its broken state, reset HEAD~ (resets you to the state your working copy was in before the commit), fix your working copy, and then commit -a -c HEAD@{1} to use the old commit message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the middle of creating a simple/quick translator that just translated selected
I am in middle of R & D that I need to open any
I'm in the middle of modifying a test message application and one of the
I have a middle size query with 500.000 registers from an Oracle to an
I am in the middle of converting a listview example into a program that
I'm in the middle of a contract that is porting a company's hand-rolled Microsoft
I am building a middle size system and I am facing a problem that
We are in the middle of looking for open source change control management software.
I'm writing a middle-tier WCF service that needs to fetch some data from a
I have a method that uses Entity Framework to do some changes/inserts in different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.