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 9063465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:00:37+00:00 2026-06-16T16:00:37+00:00

I’m new to GIT. I downloaded GIT for Windows from a GitHub link a

  • 0

I’m new to GIT. I downloaded GIT for Windows from a GitHub link a few days ago. I’m using the command line tool MinGW32. I’m not comfortable with the default editor so I’ve been trying to set up my favourite editor.

I followed the instructions here to use
EditPad Pro as my editor. But I keep getting the following message:

Aborting commit due to empty commit message.

EditPad Pro opens a new instance. MinGW32 is waiting because I don’t get the abort message until after I close EditPad Pro. When the editor opens, it opens with a blank file called COMMIT_EDITMSG. When I close the editor, the file saves to the main directory for the repo.

I found a clue in this answer, specifically this phrase:

[Vim] saves the file to .git/COMMIT_EDITMSG by default

If I do a Save As to save the file to the .git directory before closing the editor, then it works. However, there are two problems with that:

  1. I have to remember to Save As
  2. I don’t get the helpful comments that Git adds by default to COMMIT_EDITMSG

The current config setting for core.editor is:

"'D:\Program Files\JGsoft\EditPadPro5\EditPad Pro.exe' //newinstance"

I’m not sure what the $* mentioned in the instructions is for, but I tried it with and without that and also assorted variations with and without single/double quotes. I tried setting the value in a shell script as well. At worst, it doesn’t work at all (e.g. won’t even open the editor) and at best it opens a blank file.

How do I get my editor to open with the file that Git created in the .git directory?

EDIT: I get the exact same results whether I use $* or not, and this answer says it’s not needed. This Git Pro page makes mention of it when explaining how to set up external merge and diff tools, but makes no mention of it when explaining the core.editor config setting. Note: I also tried %*.

If the $* variable was needed (and missing), I would think that EditPad Pro would open with a blank Untitled file rather than a blank COMMIT_EDITMSG file in the current directory. The problem seems to be the path.

EDIT: I’ve done more experimenting. I have spaces in my file path and I thought that might be causing a problem. I cloned my repo into a new directory with no spaces in the name and fixed my config variables. It didn’t solve the problem. But I noticed another problem. In some of my tests, the blank file that was loaded into the editor was named $@.

  • 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-06-16T16:00:38+00:00Added an answer on June 16, 2026 at 4:00 pm

    There are several issues that can be causing confusion and problems.

    1. The Shell Special Variable

      If core.editor is set to the editor path and filename, then the $* variable is redundant and not needed. However, if the core.editor is set to a shell script, then the $* variable must be passed along to the editor.

      This is valid:

      $ git config --global core.editor "'D:/Path To/EditPadPro.exe' //newinstance"
      

      This is also valid:

      $ git config --global core.editor "'E:/Path To/editor.sh'"
      

      when editor.sh contains:

      #!/bin/sh
      "D:/Path To/EditPadPro.exe" //newinstance "$*"
      
    2. Spaces in File Names

      Filenames with spaces can be a pain. If the path/filename is quoted, then it isn’t usually a problem. But when setting the value of core.editor you have to either

      escape the spaces like this:

      "E:/Path\ To/editor.sh"
      

      or quote it twice like this:

      "'E:/Path To/editor.sh'"
      

      Without the extra quotes (or backslash escapes), you will have no problem setting the value, but it will fail when it’s used because the outer quotes are not part of the value.

      EDIT: Latter method (quoting twice) seems safer. See the edit at the bottom for more explanation.

    3. Windows Path Separator

      The filename that is being passed to the editor can be a relative path (i.e. .git/COMMIT_EDITMSG) or absolute path (i.e. e:/path to/.git/rebase-merge/git-rebase-todo), but in both cases it is using forward slashes as a path separator. Windows can usually accept forward slashes as a path separator, especially if the path is quoted. Perhaps the older version of EditPad Pro is unable to accept the forward slashes in combination with the hidden directory. A little bit of preprocessing can fix this.

      Note: Hardcoded paths with forward slashes and no hidden directory seem to work fine. Hardcoded paths with hidden directories and backslashes seem to work fine.

    Final Solution

    I’m not very experienced with shell scripting, but the following is now working for me.

    The editor.sh file contains:

    #!/bin/sh
    fullpath=`echo "$*" | tr '/' '\\\'`
    "D:/Program Files/JGsoft/EditPadPro5/EditPadPro.exe" //newinstance "$fullpath"
    

    and the config is set like this:

    $ git config --global core.editor "'E:/Path To/editor.sh'"
    

    My copy of EditPad Pro 5.3.2 is now opening with the correct files already loaded, regardless of what git command launches the editor.

    EDIT: I had to change the value of core.editor. I had used backslashes to escape spaces in the path and this opened the editor properly. However, when a GIt command passed a fielname with a relative path (beginning with a dot) to my shell script, the value of $* was $@ rather than the filename, which caused the editor to open with a blank file named $@. I thought I tested that combination, but apparently not. Using the quote twice method works.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am using jsonparser to parse data and images obtained from json response. When
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am using JSon response to parse title,date content and thumbnail images and place
I want use html5's new tag to play a wav file (currently only supported
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.