Error opening text editor in Git

Asked

Viewed 54 times

0

I’m trying to change the message of my last commit through Git Bash using the command git commit --amend. However, when it attempts to open the editor, Git generates the following error:

$ git commit --amend
hint: Waiting for your editor to close the file... 'C:\Users\Jean' não é reconhecido 
como um comando interno ou externo, um programa operável ou um arquivo em lotes.

[main 47981f3] added day-10 challenge part 2
 Date: Mon Dec 14 20:49:23 2020 -0200
 3 files changed, 145 insertions(+), 1 deletion(-)
 create mode 100644 2020/day-10/input.txt
 create mode 100644 2020/day-10/solution.py

My editor is Atom and I set it up for Git as follows:

git config --global core.editor "atom --wait"

What am I doing wrong? How can I fix this problem?

  • Has consulted git config --list to make sure it’s set up the way you want it? Maybe you have spaces in your username?

  • It seems that it is a specific problem in Windows Atom. See here and here. And here also.

  • @Hildeberto yes, it is configured and yes, I have a username spacing

1 answer

0

Try rotating the command below again but placing single quotes instead of double quotes:

git config --global core.editor 'atom --wait'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.