git -> show list of files changed in recent commits in a specific directory

Git

Git Problem Overview


In Subversion svn log is the command to display commit log messages -- for details see the online manual at http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.log.html

How can I do:

svn log -v -l 10 ./

in git?

Git Solutions


Solution 1 - Git

This one is more similar to the svn command as it shows the file status: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), and others.

git log --name-status -10 path/to/dir

It is worth looking at the full documentation page for git log. There you will learn that -10 refers to the past 10 commits, and -p will give you the full patch, among a variety of other goodies.

Solution 2 - Git

To show all files changed in the last 10 commits, without any commit information, do:

git diff --name-only HEAD~10..HEAD yourdir

Solution 3 - Git

Try to do

git log -p -10 yourdir/

It should work.

Solution 4 - Git

To show all the commit of your branch(recent and old), you need to count the number of commits in the branch

git rev-list --count branch_name

Once you get all the commit count, you can run

git log --name-status -countNumber /path

Solution 5 - Git

> git show $commitId$ --name-only

It will result in the files which are changed during this commit

Solution 6 - Git

I've had great luck with this:

$ git reflog --name-status -10 <path/to/folder/of/interest>

Finds things log does not. Pipe output to grep if you know part of a name.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsumekView Question on Stackoverflow
Solution 1 - GithtanataView Answer on Stackoverflow
Solution 2 - GitdbnView Answer on Stackoverflow
Solution 3 - Gitblue112View Answer on Stackoverflow
Solution 4 - GitSayan BiswasView Answer on Stackoverflow
Solution 5 - GitManvendra_0611View Answer on Stackoverflow
Solution 6 - GitKenneth SizerView Answer on Stackoverflow