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?
asked Mar 1, 2017 at 17:01
Hakan BabaHakan Baba2,07566 gold badges2626 silver badges4242 bronze badges
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")
answered Mar 5, 2017 at 19:39
Hakan BabaHakan Baba2,07566 gold badges2626 silver badges4242 bronze badges
4Start asking to get answers
Find the answer to your question by asking.
Ask questionExplore related questions
See similar questions with these tags.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4