Hi people. The last day, I got a simple task, get all path and name from git log.
In this case It's only necessary a console and project whit some commits.
In my case I used the second command and added some parameters because I was filter by date, then I will write a report on excel, to remove duplicates files affected
The simplest command is there:
git log --raw
This command get the name of author, date, commit and file affected. Is simple but is not for me, because I need the path and name of the file affected. Not all these data
The second command is here:
git log --pretty=format: --name-onlyThe command getting only the path and name; is just I needed. Not showing extra data, but it's separate by newline (later is necessary to delete for create a report for my boos)
If you need show the author and date, only add some parameters, for example
git log --pretty=format:"%an, %ar%n" --name-only
Another way for get only paths and names is there, the problem with this command is getting all files. You think, my project contains 10k files affected, the time to get all data is slow. This command is not insert newline for separate the paths and names.
git log --pretty=format: --name-only --diff-filter=A | sort -u
git log --pretty=format: --name-only --since "nov 22 2022" --until "dec 9 2022"This command is very helpful
Comentarios
Publicar un comentario