Skip to content

Instantly share code, notes, and snippets.

@lstor
Last active April 3, 2016 18:35
Show Gist options
  • Save lstor/1f858accec946ca097defd4307dbf0a0 to your computer and use it in GitHub Desktop.
Save lstor/1f858accec946ca097defd4307dbf0a0 to your computer and use it in GitHub Desktop.
Install dotfiles
echo "Installing dotfiles..."
# Clone repo
git clone --bare --separate-git-dir=$HOME/.dotfiles https://github.com/lstor/dotfiles $HOME/dotfiles-unused
# Move submodules, if any
if [ -x ~/dotfiles-tmp/.gitmodules ]; do
cp -v ~/dotfiles-tmp/.gitmodules ~
fi
# Configure
alias cfg='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
cfg config --local status.showUntrackedFiles no
# Remove tmp dir
rm -vr ~/dotfiles-tmp/
# Get files from bare repo
cfg checkout
echo "Installation done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment