https://github.com/coderosh/git_config
Get local or global git config as a dictionary
https://github.com/coderosh/git_config
Last synced: 7 months ago
JSON representation
Get local or global git config as a dictionary
- Host: GitHub
- URL: https://github.com/coderosh/git_config
- Owner: coderosh
- License: mit
- Created: 2021-06-23T14:38:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-23T15:59:11.000Z (over 4 years ago)
- Last Synced: 2024-10-10T09:17:12.263Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git_config
> Get git config as a dictionary
## Installation
```sh
pip install git_config
```
## Usage
```py
from git_config import get_config
# Global git config
config = get_config()
config["user"]["name"] # Roshan Acharya
config["user"]["email"] # acharyaroshan2357@gmail.com
# Local git config
config = get_config("local")
config['remote "origin"']["url"] # git@github.com:coderosh/git_config.git
```