You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Murdo Moyse edited this page Jan 9, 2020
·
2 revisions
Remove a Commit
Editing the git history is bad practice in version control and should only be done in the case of a security issue.
Furthermore, please make sure that the author of the commit removes the file from their version of the branch, otherwise the same issue will occur.
1.Type the following command into GitBash/Command prompt (optional: you can include the hash value of the commit if you want to reset a specific commit).
gitreset –softHEAD^
This will reset the repository to a previous state.
2.Use the following git command to show that the repository has been returned to a previous state.