0

when I enter git commit -a in Git Bash, the editor appears. When enter esc, the screen blinks, but I do not leave. I tried all the other commands from git commit -a confusion, but I cannot leave. If I close the editor and reopen the bash, all the commands in the cash went (with top arrow) and also the pointer to the working directory is destroyed.

Is it possible to use git commit -a <filename> and then push ? I will set git to write a default msg.

2 Answers 2

2

You can specify a message with -m:

git commit -m "Some commit message" 

Or change your editor to something you find easier to use:

git config --global core.editor "nano" 

Or with vi, just hit O, type your message, hit <esc>and then :wq.

Sign up to request clarification or add additional context in comments.

1 Comment

I prefer the O , a big O from the alphabet and to save the file I prefer the shortcut x in vim instead of wq..
-1

I think you should use git config --global core.editor "vim"

2 Comments

Thanks, but I already have the vim setting as git editor. Please check the other answer for a solution.
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.