LoginSignup
29
13

More than 5 years have passed since last update.

Git で 削除したファイルのログを見たい時

Posted at

削除したファイルについて
「これいつ削除したっけ?」
とか
「なんで削除したんだっけ?」
という時に、GitHubからだと追っかけにくいので、
そんな時は、Git コマンドでのログの見ると見やすい

削除したファイルのログを確認する

$ git log -- <ファイルPath>

example

repository/
  ├ src/
  │  └ main/
- │    └ code
+ │    └ code2 
  └ README.md

と、 file code を削除し、
code2 を 追加した時の
code の 履歴を見るときは、

$ git log -- src/main/code

で見れる。

29
13
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
29
13