There's many like this but this is mine.
- Install Brew package manager
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install
git
brew install git
- Add the following
alias
in your.bashrc
.
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
- Add
.cfg
in your global.gitignore
to avoid recursion issue when cloning this repository.
echo ".cfg" >> ~/.gitignore
- Clone this repository
git clone --bare [email protected]:faizmokh/dotfiles.git $HOME/.cfg
- Define
alias
for current scope
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
- Checkout the content from repository to your
$HOME
. If there's any issue, simply checkout the working files.
config checkout
- Set
showUntrackedFiles
tono
config config --local status.showUntrackedFiles no
- Now, you can use
config
like how you normally usegit
. Eg:
config status
config add .vimrc
config commit -m "Add vimrc"
config add .bashrc
config commit -m "Add bashrc"
config push
sudo chown -R `whoami` /usr/local/*
sudo chown -R `whoami` /usr/local/
brew analytics off
touch ~/Documents/screenshots
defaults write com.apple.screencapture location ~/Documents/screenshots
To install, run the following in $HOME
directory:
brew bundle --global
Set up Vundle
Vundle is a plugin manager for vim. To set it up, run the following:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Launch vim and run :PluginInstall
If something fucks up, simply refer to the original article by Nicola Paolucci to debug it yourself.