4

Right before pulling I ran git reset HEAD --hard. Then I git pulled and got the message

Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream...

Is it possible to issue a merge --abort from the text editor or after entering a merge message following these instructions or do I have to undo the merge after the merge?

My idea: close the terminal, reopen MINGW and then try merge --abort. Will this leave my local repo corrupted?

Community
  • 1
  • 1
user5389726598465
  • 1,278
  • 2
  • 12
  • 24

1 Answers1

8

Generally when git asks you to edit a text file as part of some action, you can abort the action by saving an empty text file. This works for commit messages as well as for, e.g., git rebase -i.

amalloy
  • 83,458
  • 7
  • 138
  • 194