Skip to content

Instantly share code, notes, and snippets.

@zygimantus
Created March 7, 2023 16:35
Show Gist options
  • Save zygimantus/bbd0cce9ffd426254677cf27e466d5bb to your computer and use it in GitHub Desktop.
Save zygimantus/bbd0cce9ffd426254677cf27e466d5bb to your computer and use it in GitHub Desktop.
Dotfiles installer
if [[ ! -e $HOME/.dotfiles ]]; then
# clone your dotfiles repository
git clone --bare https://gitlab.com/zygimantus/dotfiles.git $HOME/.dotfiles
# define the alias in the current shell scope
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
# checkout the actual content from the git repository to your $HOME
dotfiles checkout
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment