Open fadc80 opened 5 years ago
Do you mean revert a commit?
I meant adding support to the git reset command. A good option to undo local commits. It can be used to rewind your current HEAD branch to a specific revision. For example, the following command undo the last commit:
git reset --soft HEAD~1
It rewrites the history tree like a rebase does, but it's safe for changes only committed locally.
The [EGit Eclipse plugin]() support this command through its history view:
The revert command you mentioned works differently. It adds one or more commits that undo a specific previous commit. It doesn't rewrite the history tree. Therefore, it's a better option when you have changes already pushed to a remote repository.
I agree, it would be nice to have a way to use git reset --hard
or git reset --soft
to move the current branch to a given commit. It is especially useful when working on a branch locally and then preparing it to be pushed by cleaning up the history.
What about adding the reset command as an option when you click on a specific commit? I mean, as EGit Eclipse plugin does (pop up option)...