Open dmerejkowsky opened 7 years ago
as a note: only the config wizard does not work, the tool does work! At the end of the configuration section, it is explained how you can extract your git-repo configuration into another file.
For those who like to keep all dotfiles in a git repository, it'd be horrendous to store tokens that offer access to your social accounts in a repository… And I'm not even talking about those who want to share your dotfiles. But don't worry, once it's all configured, you can fire up your favorite editor and move all the
[gitrepo …]
sections into a new file, like~/.gitconfig-repos
.Your can run the following command to do this automagically:
python -m git_repo.extract_config
if you want to use another path, you can change the defaults:
python -m git_repo.extract_config ~/.gitconfig-repos ~/.gitconfig
you can extract your git-repo configuration into another file.
ahah! Nice.
Feel free to close, then
well, the issue is still painful and there's a tracking issue on gitpython. I guess I could add take the reference to the config file that needs to be modified?
though that comment was for whoever popped on the #git-repo channel asking on how he can use a versioned git config, citing this issue... 😉
@guyzmo Ah, that was me; thanks for the quick response! Configuring with git repo config
and then using the extract_config
script worked well. I had been trying to use something like git repo config --config=~/.gitconfig-repos
but was getting errors mentioning a missing .lock
file, which I would guess is on the GitPython end.
Steps to reproduce:
~/.git
does not existRun
git-repo config
, do the oauth dance.Nothing is stored.
PS: I think this is a bug in the code that reads and writes git config. If I were you, I'll just run
git config --get foo.bar
andgit config --global foo.bar 42
instead of using a re-implementation of git config parsing in Python.