Want to cancel the commit operation in smart git. I accidentally committed the wrong code and now cannot restore this code.
Thanks in advance.
In SmartGit, just call Local | Undo the last commit ; this will return your changes to the Index. Now you can partially or completely remove them using Local Reset .
The actual commit command can be undone with git reset --soft @~
commit
git reset --soft @~
Please browse this thread: smartgit remove commit and revert to previous commit
as the answer said, it is not specific to smartgit, but git in general. You just need to roll back to the previous commit, create another branch and work on it!
Follow these rules :)