How do I git checkout two branches and check for differences in subdirectories? Ideally, the scrip would do the following:
Your script could use the git worktree
command in order, from one local cloned repository, to checkout two different branches in two separate folders.
(note: a Python library like gitpython does not support directly git worktree
-- issue 719 -- but you can still call that git
command)
For each file differences between the two branches, you can query through git log
the last commit author/date of said file.