Ed Wright
Ed Wright

Reputation: 106

How can I get 'git log' to display filenames?

Which command should I use (in Git Bash) to display a history of commits, comments, user, date, and most importantly the file name?

Upvotes: 0

Views: 366

Answers (2)

Joseph K. Strauss
Joseph K. Strauss

Reputation: 4903

git log --name-only

or

git log --name-status

will show you the file names modified. The difference between the two is that --name-only will only display file names, while --name-status will have an additional letter before the name indicating the files's status, i.e.,

  • A - Added
  • M - Modified
  • D - Deleted

There are some additional ones for renames and copies, but these are not as common as the three listed here.

Upvotes: 2

poke
poke

Reputation: 387517

git log --stat will show the detailed history and will also show which files were changed in each commit.

If you want to further customize the output from git log, check the documentation for configuration details.

Upvotes: 3

Related Questions