Open
Description
In git directory, there is a config
file on which many great things can be operated:
- fetch patterns
- upstream settings
- ...
This file is using a format looking like this:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:gitonomy/gitlib.git
[branch "master"]
remote = origin
merge = refs/heads/master
This file can be overriden by user's file (~/.gitconfig
). Recently, environment variables have been disabled in process (thanks @lyrixx), so this disable fully the user's inherited configuration.
Two strategies can be imagined:
- Parse the file and allow manipulation of it
- Use
git config
command