Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

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?

like image 600
sumek Avatar asked Nov 05 '10 09:11

sumek


People also ask

How do you find a list of files that has changed in a particular commit?

Find what file changed in a commit To find out which files changed in a given commit, use the git log --raw command. It's the fastest and simplest way to get insight into which files a commit affects.

How do I see changes in a specific commit?

Looking up changes for a specific commit If you have the hash for a commit, you can use the git show command to display the changes for that single commit. The output is identical to each individual commit when using git log -p .

What is the command for viewing a list of the recent commits?

The most basic and powerful tool to do this is the git log command. By default, with no arguments, git log lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.


1 Answers

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.

like image 170
htanata Avatar answered Nov 16 '22 00:11

htanata