I have a repo initialized as
r = git.Repo.init(dirPath)
How can I get the user.email field for the git config for that repo using gitpython?
After looking into the source of gitpython this is one way I managed to do it.
r = git.Repo.init(dirPath)
reader = r.config_reader()
field = reader.get_value("user","email")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With