Vscode: Git amend - message and staging

Created on 7 Mar 2017  路  9Comments  路  Source: microsoft/vscode

Hi!

  • VSCode Version: 1.10.1
  • OS Version: macOS Sierra

1) When I need to amend last git commit, most of the time I don't want to change the last commit's message. So VSCode should use the last commit's message as a default when no new message is explicitly provided. Currently, a warning dialog appears and the user is forced to look at last message and paste it there again manually.

2) Also, explicit Staging of files to amend is a bit clumsy. Most of the time I want to amend all the files I edited. Imho it would be much better if it would behave the same as for common Commit action. So that "everything is part of amending, until something is explicitly staged...then only staged files are part of amending".

Thanks a lot!

bug git

All 9 comments

Try to keep separate issues/requests into separate GitHub issues.

Moved second step to #22215

Ou, yep, sry.

I actually find more usable to "Undo Last Commit" and commit again. In this flow, the previous commit message is pre-filled so it's a reasonable workaround for me util this issue gets fixed.

I suggest going with @borekb's tip.

Is Amend gone from VSCode 1.11?

image

Just asking, I'm fine with "Undo Last Commit" flow.

Actually it is yeah.

Keeping the previous commit message when doing an amend is how Source Tree works and is a logical user experience.

I don't find the work around very friendly, especially if you have a mix of stage and unstaged files.

Can this be re-opened?

A workflow which I find very frustrating with the 'Undo commit' action is when I've committed only some lines of a file. On doing the 'Undo commit', it puts all the committed files into the unstaged area - which causes all the committed lines to get mixed with uncommitted lines, and I have to do the line staging for each file all over again!

Maybe 'Undo Last Commit' command could be updated to keep the Git index / staged files? It's true that I'm hitting that scenario sometimes as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VitorLuizC picture VitorLuizC  路  3Comments

lukehoban picture lukehoban  路  3Comments

villiv picture villiv  路  3Comments

mrkiley picture mrkiley  路  3Comments

trstringer picture trstringer  路  3Comments