LoginSignup
1
2

【Git】特定のファイルだけコミット前に戻したい

Posted at

はじめに

gitの操作でわからないとこがあったので記録しておきます

やりかた

間違ったコミットの一つ前のコミットIDを見つけます

ターミナル
git log 戻したいファイルのパス

戻します

ターミナル
git checkout コピーしたコミットID 戻したいファイルのパス

おわり

gitはまだまだ知らないことだらけなのでもっと勉強して知識を付けていきたいです。

参考記事

1
2
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
1
2