Skip to content

Instantly share code, notes, and snippets.

@GabrielMMelo
Created December 19, 2020 16:23
Show Gist options
  • Save GabrielMMelo/496144fef601a1d7385b3552e625dbfd to your computer and use it in GitHub Desktop.
Save GabrielMMelo/496144fef601a1d7385b3552e625dbfd to your computer and use it in GitHub Desktop.
Creating and cloning a dotfiles (bare) repo
# creating
git init --bare $HOME/.cfg
alias dotfiles='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
# cloning
git clone --bare https://github.com/USER_NAME/.dotfiles.git ~/.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment