LoginSignup
12
11

More than 5 years have passed since last update.

gitであるファイルを変更前の状態に戻したり、全部のファイルを変更前に戻したり

Posted at

人生は変更前に戻せませんが、gitで管理しているソースコードは変更前に戻せます!

git checkout hello.rb

これで変更前(直前のコミットの状態)に戻せます。

また、全部戻したい時は、

git checkout -f

これでそのプロジェクト内のファイルを全部直前のコミットの状態に戻せます。

色々いじったけど戻さなきゃいけなくなった時にぜひぜひ。

12
11
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
12
11