-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commit amend loses multiline format in commit message #40295
Comments
I think that when this issue will be addressed, some more work must me done to improve "amend" feature ergonomy. I think we should be able, with vscode, to amend only the commit message. At the moment, we must commit changes in the same time. I also think that we should not use the command palette to edit the commit message like it's done at the moment... I propose that:
PS: we could add an option somewhere to "stop" amending the commit if the user decide not to do it in the end.... |
Any idea when this fix will be implemented? Thanks! |
If you need a workaround, this works beautifully in the integrated terminal: EDITOR="code -w" git commit --amend I actually put this in my if [ ! -z "$VSCODE_IPC_HOOK" ]; then
# Use vscode as the editor for things like Git when run from within vscode's integrated terminal
export EDITOR="code -w"
fi Now every time I do git things like |
Atom's implementation of this is quite nice. It has an amend checkbox which brings the "commit to be amended" commit message, and files, into the UI. This allows you to remove files from the commit by "unstaging" (Not sure what this does in the underlying Git repository) them in the UI, and you can edit the commit message using the same UI as a normal commit. Avoiding a problem like this. |
Still an issue in 2019. I miss some input from the VSCode team... |
Just stumbled over this one myself several times now. Any update/feedback on this one? It's cumbersome having to switch to a shell to run |
Any update? |
This pretty much breaks amend functionality for my team, it would be really great if this gets fixed eventually. |
Any info on this? |
I just see that the GitPod service which use the theia editor (which is based on VSCode) is doing it very well! The PR bringing the fix: eclipse-theia/theia#1726 If that inspired someone to do it...And perhaps even get some code from the project... |
I am also running into this bug. Would really appreciate un-breaking the amend flow! |
Another vote that this get fixed. I ammend my commit all the time until merge and I hate losing the newlines in my commit message. |
It appears that @joaomoreno will spend hours identifying reports from all the other people annoyed by this, but nobody will spend an hour to fix it |
There's no need for that. While the bug is indeed annoying, there are almost 4000 issues demanding attention, apart from the work that's already on the roadmap. Your particular pet issue does not get priority simply by virtue that it annoys you. Reasons why this might not be a priority:
If it doesn't bother you enough for you to fix it yourself and open a pull request, it probably shouldn't bother you enough to lash out at the hard working developers who bring us a great product that measurably improves month by month, as evidenced by the changelog. |
I think that a good workaround would be to add another amend option to VSCode that uses |
Close to 3 years,...... |
You should not delete Change-Id. This is how gerrit associates your commit with the change entity. |
seem that every commit will generate a new chang-id. if not there are two changeids in the commit-msg. To seek the answers to authority |
If this happens to you, something is wrong with your commit-msg hook... |
Do you mean that I don't need to delete the change-ID, It will keep the ID after Amend? thank for you remind |
Exactly |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I've got a scrappy PR to add a It would be great to get some direction on if/how something like this could be deemed an acceptable solution, because I think this is much needed for gerrit users as the current behavior clobbers the |
What a horrible comment. Mentioning people just to dump sarcasm and vitriol on them. This is not the way to motivate the maintainers to look into this issue. |
Hello Ed,
Wrote my feelings but mabe was rude, really.
Thanks for the corrective action.
Best regards!
…On Wed, Nov 4, 2020 at 3:01 PM Ed Rivas ***@***.***> wrote:
What a horrible comment. Mentioning people just to dump sarcasm and
vitriol on them. This is not the way to motivate the maintainers to look
into this issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#40295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQMRHOWAY2Q4MG34RIHUP33SOFGD7ANCNFSM4EINZV6Q>
.
|
When running
If you'd like to edit the old commit message, you can always run |
Aha, right, so for my use-case (doing a Bit of an odd user experience, but I'm just happy I can do this 👍 |
@alexrussell With the changes I just pushed, you don't need to delete any auto populated text, since you won't even be prompted for any input at all. Running This will be released in the next insiders. |
But what if you WANT to amend the commit message? I do this sometimes to fix typos, add something about the file I forgot to add to the commit, etc. |
Also, of the original request items:
|
Ahh cool. And yeah, I said I confirmed that it worked but actually I think I was mistaken. So that tallies up with you saying it wasn't released yet! I look forward to my next insiders build then. Thanks @joaomoreno! |
As I said: run
The same applies, simply run |
Cool. This sounds like a good compromise. Thanks for the change. The messed up commit message formatting on amend hit me more than once. |
No description provided.
The text was updated successfully, but these errors were encountered: