31,040
edits
| Line 134: | Line 134: | ||
To cancel a commit: | To cancel a commit: | ||
* With GIT Command Line Interface: | |||
* With GIT Command Line Interface, if commit was not already pushed: | |||
<source lang="bash"> | |||
git reset --soft HEAD~1 | |||
</source> | |||
* With GIT Command Line Interface, if commit was already pushed: | |||
<source lang="bash"> | <source lang="bash"> | ||
git revert IdCommit or git revert HEAD (for last commit) | git revert IdCommit or git revert HEAD (for last commit) | ||