I could use Git
command git log --oneline tag1 tag2
to list all commits between two tags. Then use git show --pretty="" --name-only commitId
to list the changed files in one commit.
How to achieve this using GitPython
?
How to list all changed files between two tags in GitPython
1.3k views Asked by Kerwen At
1
If you know a git command, you can use git directly in GitPython. Taking
git show --pretty="" --name-only HEAD
for example:HEAD
remain unchanged as non-keyword arguments.--pretty=""
are converted to keyword arguments by removing the leading--
.--name-only
are converted to keyword arguments by removing the leading--
and being assigned the valueTrue
.-
in the keys and commands are converted to_
.name-only
should bename_only
.git for-each-ref
should begit.for_each_ref
.The command
git log --oneline tag1 tag2
does not list commits between the two tags. It lists commits reachable from any of the two tags.