question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

revert a commit while keeping changes

See original GitHub issue

Sometimes I accidentally commit an additional file and find myself having to google one more time the exact syntax of the git reset --soft HEAD~1 command.

This command undoes the latest commit while keeping the changes.

It would be great if Github for Windows had this functionality through the UI! Not necessarily undoing the latest commit, maybe instead being able to undo an arbitrary commit.

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, Mar 29, 2019

It doesn’t fade away after a period of time, but it might be hard to notice because the button blends into the rest of the form. cc @desktop/design for 👀 and thoughts.

I’m going to tweak this discussion to focus on that “Undo” form - thanks for the clarifying details @marcospgp!

0reactions
shiftkeycommented, Apr 10, 2019

I’m going to bump #6901 because I think making that more visible to the user would have helped in this situation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I delete a git commit but keep the changes?
Yes, you can delete your commit without deleting the changes: ... You can revert a specific commit while keeping the changes in your...
Read more >
Undo last commit but keep changes
Undo last commit but keep changes · GitHub. Instantly share code, notes, and snippets.
Read more >
Revert last commit but keep all the changes to the files with ...
Revert last commit but keep all the changes to the files with git reset --soft HEAD~1 · Check current status · Commit ·...
Read more >
How to revert a Git commit: A simple example
In this quick git revert example, we'll show you how to revert a Git commit and undo unwanted changes.
Read more >
Undoing Recent Commits While Keeping Changes to Files ...
Make Changes to Files · The default reset command is "git reset " (where defaults to HEAD, which is last committed state) ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found