Skip to content

Instantly share code, notes, and snippets.

@OdinsHat
Created January 1, 2020 02:15
Show Gist options
  • Save OdinsHat/a7fa7c59be873bf74f3185f5e5451358 to your computer and use it in GitHub Desktop.
Save OdinsHat/a7fa7c59be873bf74f3185f5e5451358 to your computer and use it in GitHub Desktop.
Generate Dotfiles config directory as described on my blog with inspiration from
#!/bin/sh
git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
touch .zshrc
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment