Skip to content

Instantly share code, notes, and snippets.

@fornellas
Last active August 21, 2022 12:19
Show Gist options
  • Save fornellas/1c044898d269b335dbfc65c8f752fcde to your computer and use it in GitHub Desktop.
Save fornellas/1c044898d269b335dbfc65c8f752fcde to your computer and use it in GitHub Desktop.
REPO="$HOME/src/dotfiles.git"
GITHUB_REPO_URL="git@github.com:fornellas/dotfiles.git"
mkdir -p "$REPO"
cd "$REPO"
git init --bare
cd -
alias dotfiles='git --git-dir="$REPO" --work-tree="$HOME"'
dotfiles remote add origin $GITHUB_REPO_URL
dotfiles pull origin
dotfiles checkout origin/master
dotfiles branch master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment