LoginSignup
0
0

More than 3 years have passed since last update.

Git でやらかした時の対処法

Posted at

ここで紹介する方法は非常に危険なため、100%自分のブランチでない限りは使わないことをお勧めします。

ローカルを任意のコミットまで戻す

git reset --hard <コミットハッシュ値>

任意のコミットまで戻したローカルの変更をリモートに反映させる

git push -f origin <ブランチ名>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0