Keep your
~/.gitconfig
synchronized across different computers.
-
Fork this repo.
-
Run the following on the computer that has the best
~/.gitconfig
:git clone --depth=1 git@github.com:<your-github-username>/shared-git-config.git ~/shared-git-config mv -f ~/.gitconfig ~/shared-git-config/.gitconfig ln -s ~/shared-git-config/.gitconfig ~/.gitconfig cd ~/shared-git-config git add .gitconfig git commit git push -u origin master
-
Run the following on all other computers:
git clone --depth=1 git@github.com:<your-github-username>/shared-git-config.git ~/shared-git-config mv -f ~/.gitconfig ~/.gitconfig.bak ln -s ~/shared-git-config/.gitconfig ~/.gitconfig
-
When you have modified your git config and you want to publish it everywhere,
# On the computer where you modified your git config cd ~/shared-git-config git add .gitconfig git commit git push -u origin master # On other computers cd ~/shared-git-config git pull --ff-only
WTFPL