Non-recursive git log and diff

git log -p .

only in the current directory, but not in subdirectories

equivalently

svn log --diff --depth files .

Is it possible?

+5
source share
2 answers

What about:

$ git log -p file1 file2 ...

Or, if there are too many, enter:

$ find . -maxdepth 1 -type f | xargs git log -p
+2
source

On Linux, etc. you can only specify files in the current directory with

ls -p | grep -v /

So:

git log -p `ls -p | grep -v /`

is one way to do this.

0
source

Source: https://habr.com/ru/post/1607100/


All Articles