Skip to content

Instantly share code, notes, and snippets.

@feoh
Last active December 3, 2025 15:06
Show Gist options
  • Select an option

  • Save feoh/3bcde14af243d1bc626aad0f652fe49c to your computer and use it in GitHub Desktop.

Select an option

Save feoh/3bcde14af243d1bc626aad0f652fe49c to your computer and use it in GitHub Desktop.
New maching dotfile as Github home dir setup script
#!/bin/sh
echo "Remember you need SSH credentials in place. You good?"
echo "Press enter to continue or Ctrl-C to break out and fix SSH :)"
read yesorno
MYDOTFILESREPO="feoh/git_dotfiles"
echo ".cfg" >> .gitignore
# gh repo clone $MYDOTFILESREPO $HOME/.cfg
git clone --recurse-submodules git@github.com:$MYDOTFILESREPO.git $HOME/.cfg
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/.git --work-tree=$HOME'"
alias config='/usr/bin/git --git-dir=$HOME/.cfg/.git --work-tree=$HOME'
cd $HOME/.cfg
config config --local status.showUntrackedFiles no
config checkout
config reset --hard
cd $HOME
git clone git@github.com:ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment