5

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,418
  • 2
  • 14
  • 25

1 Answers1

9

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
  • 89,153
  • 8
  • 140
  • 205