Skip to content

Instantly share code, notes, and snippets.

@joeyjiron06
Last active October 30, 2021 08:23
Show Gist options
  • Save joeyjiron06/e8a23096674cefd420e5 to your computer and use it in GitHub Desktop.
Save joeyjiron06/e8a23096674cefd420e5 to your computer and use it in GitHub Desktop.
mac-setup

Setting up mac

Downloads

Commnad Line Tools

#Git (typing 'git' will prompt you to install xcode command line tools)
git

#Git AutoComplete
# you might run into a version problem, meaning the script requires a newer version of git. you can either update git or use a version of the script that matches your git version. see instructions here  https://apple.stackexchange.com/questions/327817/git-completion-bash-producing-error-on-macos-sierra-10-12-6

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
#add this to your bash profile
if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

#Sexy Bash Prompt
(cd /tmp && git clone --depth 1 https://github.com/twolfson/sexy-bash-prompt && cd sexy-bash-prompt && make install) && source ~/.bashrc

#Solarized Theme
git clone https://github.com/jkaving/intellij-colors-solarized.git

Vim

Setup vim with spf13, a handy all in one pre-installed vim awesomeness using Vundle

#download and install
curl http://j.mp/spf13-vim3 -L -o - | sh

#fix issue when prompt askes to press enter when opening file
echo 'let g:bufferline_echo=0' >>  ~/.vimrc.local

Git Config

# add this to ~/.gitconfig
[alias]
  branch-rename = branch -m
  branch-delete = branch -D
  branch-name = "!git rev-parse --abbrev-ref HEAD"
  branch-log = "!git log $(git merge-base --fork-point origin/master)..HEAD"
  cam = commit -am
  pushb = "!git push origin $(git branch-name)"   
  pullb = "!git pull origin $(git branch-name)" 
  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment