Git list of modified files in multiple entries

I want to get all the files that have been changed in commits that meet certain conditions. So I have the following: git log --grep=123 , and I need to get the files that have been changed in what they do as an aggregated list, for example. if the file changes in several commits, it should be included only once in the resulting list. This is similar to selecting several commits in the svn turtle log window, it lists all the files that have been modified in the selected commits

+4
source share
2 answers

git log should not be used for scripting, but here's a quick fix:

 git log --grep=pattern --name-only --pretty=format:'' | sort -u 
+6
source

Not quite the answer, but if your condition is the position of the beginning and end of consecutive series, the git series is ready to help:

git diff --name-only <SHA, tag start> <SHA, tag end>

0
source

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


All Articles