Skip to content

Instantly share code, notes, and snippets.

@KanoeGitHub
Last active November 20, 2022 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KanoeGitHub/bcb16ab002d61a9144d039c29aa00f13 to your computer and use it in GitHub Desktop.
Save KanoeGitHub/bcb16ab002d61a9144d039c29aa00f13 to your computer and use it in GitHub Desktop.
getting git diffs with gitpython
import git
repo = git.Repo('<Repository Path>')
t = repo.head.commit.tree
print(repo.git.diff(t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment