Skip to content

Instantly share code, notes, and snippets.

@donchan922
Last active July 19, 2020 07:47
Show Gist options
  • Save donchan922/3595031c7bdaf02b1e8b651bab9c6dd1 to your computer and use it in GitHub Desktop.
Save donchan922/3595031c7bdaf02b1e8b651bab9c6dd1 to your computer and use it in GitHub Desktop.
# 直前のコミットを取り消す、変更した内容は取り消さない
$ git reset --soft HEAD^
or
# 直前のコミットと変更した内容を取り消す
$ git reset --hard HEAD^
# 強制的にプッシュする(歴史を書き換えるため)
$ git push -f origin HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment