Enlightenment is the unprogrammed state.
These are not meant for you. Exploit them at your own risk.
git clone --separate-git-dir=$HOME/.unix_configs [email protected]:egorbelibov/unix_configs.git ~
This might fail if git finds an existing config file in your $HOME. In that case, a simple solution is to clone to a temporary directory, and then delete it once you are done:
git clone --separate-git-dir=$HOME/.unix_configs [email protected]:egorbelibov/unix_configs.git tmp_unix_configs
rsync --recursive --verbose --exclude '.git' tmp_unix_configs/ $HOME/
rm -r tmp_unix_configs
The key idea is simple - make $HOME
the git work-tree
.
Simply create a dummy folder and initialize a --bare
repository.
mkdir $HOME/.unix_configs
git init --bare $HOME/.unix_configs
Make an alias for running git commands in the .unix_configs
repository repository.
# add to config.fish or .bashrc
alias unix_configs='/usr/bin/git --git-dir=$HOME/.unix_configs/ --work-tree=$HOME'
Add remote
and disable showUntrackedFiles
unix_configs config --local status.showUntrackedFiles no
unix_configs remote add origin [email protected]:egorbelibov/unix_configs.git
Ta-da! That’s it. Now just add all your goodies in there.
unix_configs add .bashrc
unix_configs commit -m "Add .bashrc"
unix_configs push