フォルダーのgit履歴を表示する 質問する

フォルダーのgit履歴を表示する 質問する

フォルダー内のすべてのファイルの git ログ履歴を表示するにはどうすればいいですか?

特定のファイルのログを表示する方法についてはいくつかの投稿を見つけましたが、特定のフォルダーについては見つかりませんでした。

ベストアンサー1

foldernameまたは を使用できます'foldername/*'

git log -- path/to/folder
git log -- 'path/to/folder/*'

この方法では、名前が変更されたファイルの履歴は追跡されません。

これ--もオプションです。git help log:

[--] <path>...

           Show only commits that are enough to explain how the files that match the specified paths came to be. See History Simplification below for
           details and other simplification modes.

           Paths may need to be prefixed with -- to separate them from options or the revision range, when confusion arises.

おすすめ記事