Skip to content

Keep your git config synchronized across different computers.

License

Notifications You must be signed in to change notification settings

b1f6c1c4/shared-git-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 

Repository files navigation

Shared git config

Keep your ~/.gitconfig synchronized across different computers.

Usage

  1. Fork this repo.

  2. 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
  3. 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
  4. 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

Legal

WTFPL

About

Keep your git config synchronized across different computers.

Topics

Resources

License

Stars

Watchers

Forks