A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/42537716/how-to-get-the-user-email-config-using-gitpython below:

How to get the user.email config using gitpython ?

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 Baba

2,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 Baba

2,07566 gold badges2626 silver badges4242 bronze badges

4

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore 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