Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahmadshobirin/9b1a4637cd150b1d01fa2bde7ecd9de6 to your computer and use it in GitHub Desktop.
Save ahmadshobirin/9b1a4637cd150b1d01fa2bde7ecd9de6 to your computer and use it in GitHub Desktop.
Github revert commit and updated to repo

Revert the full commit

Move to branch target ex: master

git checkout {branch}

Get commit id from the repo or git log and reseted

git reset --hard {commit_id}

Last, push with update forced

git push origin -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment