Skip to content

Instantly share code, notes, and snippets.

@srpatcha
Created March 21, 2018 19:29
Show Gist options
  • Select an option

  • Save srpatcha/cdb44178a7ca560c51ee4c3ca08b3331 to your computer and use it in GitHub Desktop.

Select an option

Save srpatcha/cdb44178a7ca560c51ee4c3ca08b3331 to your computer and use it in GitHub Desktop.

Revisions

  1. srpatcha created this gist Mar 21, 2018.
    6 changes: 6 additions & 0 deletions git_reset
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@

    git log
    git reset --hard HEAD~1 // for latest
    git reset --hard <sha1-commit-id> // for commit ID or specific 5th commit HEAD~5
    git log
    git push origin HEAD --force