Created
March 7, 2023 16:35
-
-
Save zygimantus/bbd0cce9ffd426254677cf27e466d5bb to your computer and use it in GitHub Desktop.
Dotfiles installer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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