I want git to provide me with a list of files in a folder that has not been edited since this or that version

I worked on a project, which should mainly concern each type (so in the app / views folder), but you have a lot of views. Given the combination of bash and git, how can I get a list of the files I made for editing, starting with this version?

+3
source share
1 answer

Probably an easier way to do this, but I think the following works:

If the last revision before the changes was fa1afe1, you can find all the files that were changed in app/views, using:

git diff --name-only fa1afe1 -- app/views

In addition, you can see all the files that git tracks in app/viewswith:

git ls-files app/views

, , comm -3 bash:

comm -3 <(git diff --name-only fa1afe1 -- app/views|sort) <(git ls-files app/views|sort)

(, , comm, , , /bin/sh, .)

, fa1afe1, git ls-files. , , , , , . , git log --name-only git diff.

+4

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


All Articles