- Add the repository folder to a .gitignore in your home folder to avoid recursion problems
echo '.dotconfig' >> $HOME/.gitignore
- Clone this repository as bare into the .dotconfig folder
git clone --bare https://github.com/Eihen/dotconfig $HOME/.dotconfig
- Define the alias in your current shell scope to make your life easier
alias config="/usr/bin/git --git-dir=$HOME/.dotconfig --work-tree=$HOME"
- Set the local repository configuration to don't show untracked files (otherwise every file on your home folder will be showed)
config config --local status.showUntrackedFiles no
- Checkout the actual repository content
config checkout
- If one or more configuration files already exists the above command will fail with a message about those files being overwritten. To solve this you need to move the list files to a backup folder or just remove them if you don't care.
- Init a bare repository on your $HOME folder
git init --bare $HOME/.dotconfig
- Set an alias for the repository to make your life easier (it would be pretty painful writing the full command all the time)
alias config="/usr/bin/git --git-dir=$HOME/.dotconfig --work-tree=$HOME"
- Set the local repository configuration to don't show untracked files (otherwise every file on your home folder will be showed)
config config --local status.showUntrackedFiles no
- Put the alias we used before in your .bashrc for future use
echo "alias config='/usr/bin/git --git-dir=$HOME/.dotconfig --work-tree=$HOME'" >> $HOME/.bashrc
- You use it just like a git repository, replacing the
git
with theconfig
alias
- Display changed tracked files
config status
- Add a new file or stage changes on already tracked files
config add .bashrc
- Commit the changes to the repository
config commit
- Push changes to upstream
config push
-
Nicola Paolucci for this Atlassian Developer Blog Post in which this repository structure and instructions are based.
-
Chris Kempson for the awesome base16 theme architecture.
-
Kevin Hamer for base16-termite and base16-i3.
-
Seth Wright for the base16-google-dark for termite and i3 in the above repositories.