Skip to content

Help with git config #1140

Answered by Byron
victoraugustofd asked this question in Q&A
Discussion options

You must be logged in to vote

What should work is to explicitly ask for a ConfigReader at from an existing git repository instance, like so: r = git.Repo(path).config_reader(). When that instance is asked for a value like so r.get_value('user', 'name') it would find the respective value in any of the layered configuration files, looking first in the repository configuration, then user, and then the system.

I hope that helps. Please note that I am closing this issue, yet you are free to keep posting here for follow-up questions or comments.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #966 on February 26, 2021 11:18.