Skip to content

faizmokh/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

·

There's many like this but this is mine.

Set up dotfiles on a new machine

  1. Install Brew package manager
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Install git
brew install git
  1. Add the following alias in your .bashrc.
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
  1. Add .cfg in your global .gitignore to avoid recursion issue when cloning this repository.
echo ".cfg" >> ~/.gitignore
  1. Clone this repository
git clone --bare git@github.com:faizmokh/dotfiles.git $HOME/.cfg
  1. Define alias for current scope
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
  1. Checkout the content from repository to your $HOME. If there's any issue, simply checkout the working files.
config checkout
  1. Set showUntrackedFiles to no
config config --local status.showUntrackedFiles no
  1. Now, you can use config like how you normally use git. Eg:
config status
config add .vimrc
config commit -m "Add vimrc"
config add .bashrc
config commit -m "Add bashrc"
config push

If there's a file permissions issue

sudo chown -R `whoami` /usr/local/*
sudo chown -R `whoami` /usr/local/

To turn of brew analytics

brew analytics off

To change screenshots locations

touch ~/Documents/screenshots
defaults write com.apple.screencapture location ~/Documents/screenshots

Install apps define in .Brewfile

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

References

If something fucks up, simply refer to the original article by Nicola Paolucci to debug it yourself.