Skip to content
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

Undo last commit: keep staged files via git reset --soft #60002

Closed
borekb opened this issue Oct 4, 2018 · 2 comments
Closed

Undo last commit: keep staged files via git reset --soft #60002

borekb opened this issue Oct 4, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Milestone

Comments

@borekb
Copy link

borekb commented Oct 4, 2018

The Undo Last Commit currently behaves like git reset --mixed: it undoes the commit and discards anything that has been staged. If I had previously carefully added files or hunks to the stage, this work is lost.

I think it would be better to switch to the git reset --soft behavior:

  • If adding to index was carefully done, this work would be preserved.
  • If the users wants the --mixed behavior, i.e., reset all the staged files, VSCode already has a convenient button for that.

Because of the latter point, I'd propose VSCode changes the behavior, not introduce an option for mixed vs. soft behavior.

@vscodebot vscodebot bot added the git GIT issues label Oct 4, 2018
@steevsachs
Copy link

I’d like to work on this if it’s agreed to move ahead with the change.

For the record, I agree with the proposed change, but I could also see this as a configuration to preserve behavior for users used to it.

mathiasvr added a commit to mathiasvr/vscode that referenced this issue Oct 7, 2018
@joaomoreno joaomoreno added this to the Backlog milestone Oct 9, 2018
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Oct 9, 2018
@joaomoreno joaomoreno modified the milestones: Backlog, November 2018 Nov 20, 2018
@joaomoreno
Copy link
Member

Fixed by #60104

joaomoreno added a commit that referenced this issue Nov 20, 2018
Fix #60002 Undo last commit: keep staged files
@roblourens roblourens added the verified Verification succeeded label Dec 6, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants