You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
I've been experiencing an issue committing for a long time now, but never got around to posting about it since I didn't know the exact steps to reproduce it. I finally got around to doing that and hope that you'll be able to reproduce it using the same steps.
The problem is that in a specific scenario, committing fails with the message Aborting commit due to empty commit message.. The specific steps:
Change file A. For convenience, let's name the changes to it changeset C1.
Stage file A via the Stage Files menu.
Activate the Commit command. The commit pane will open. Type a message inside it, but do not save it yet (i.e. do not complete the commit), leave it open instead.
Make another change to file A. This is changeset C2.
Add A via the Add command. This will stage changeset C2, on top of C1 - without this, a commit will only include changeset C1.
Activate the - still open - editor that contained the previously typed commit message. Save it (i.e., completing the commit).
The message "Aborting commit due to empty commit message." is shown and the commit fails.
The issue can be solved easily by just initiating another commit, but your previous commit message is lost - so if you were writing a book inside it to describe why you changed something and forgot to back that up or copy it, it's now gone.
I've pretty much learned to live with this issue by always copying my commit messages before saving, but I guess it's better if the issue is solved instead :-).
Thanks in advance
The text was updated successfully, but these errors were encountered:
For future reference and while this is still an issue for you, the COMMIT_EDITMSG file is saved in the .git directory of the repo, so if the commit fails within atom or otherwise, that file should still contain your message until it gets overwritten on the next attempt to commit.
Thanks for the tip. You are right, it appears I missed a step in my description. At step 6:
Activate the - still open - editor that contained the previously typed commit message. Save it (i.e., completing the commit).
... I apparently wasn't activating the still open editor and saving it. I was actually running the Commit command again via the git-plus menu. This automatically activates the already open editor that still contains the previous message. If you save at that point, you get the error.
My apologies, I should have tested my own steps before posting the issue :-).
Hello
I've been experiencing an issue committing for a long time now, but never got around to posting about it since I didn't know the exact steps to reproduce it. I finally got around to doing that and hope that you'll be able to reproduce it using the same steps.
The problem is that in a specific scenario, committing fails with the message
Aborting commit due to empty commit message.
. The specific steps:A
. For convenience, let's name the changes to it changesetC1
.A
via theStage Files
menu.Commit
command. The commit pane will open. Type a message inside it, but do not save it yet (i.e. do not complete the commit), leave it open instead.A
. This is changesetC2
.A
via theAdd
command. This will stage changesetC2
, on top ofC1
- without this, a commit will only include changesetC1
.The issue can be solved easily by just initiating another commit, but your previous commit message is lost - so if you were writing a book inside it to describe why you changed something and forgot to back that up or copy it, it's now gone.
I've pretty much learned to live with this issue by always copying my commit messages before saving, but I guess it's better if the issue is solved instead :-).
Thanks in advance
The text was updated successfully, but these errors were encountered: