Skip to content

Instantly share code, notes, and snippets.

@yoeran
Last active September 29, 2020 16:23
Show Gist options
  • Save yoeran/d25a006e52294cd75884c34686c0d157 to your computer and use it in GitHub Desktop.
Save yoeran/d25a006e52294cd75884c34686c0d157 to your computer and use it in GitHub Desktop.
Setup scripts after a clean install
[user]
name = NAME
email = EMAIL
[alias]
undo = reset --soft HEAD^
# Not quite as common as an amend, but still common
# https://git-scm.com/docs/git-reset#git-reset-emgitresetemltmodegtltcommitgt
glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
# No need for a GUI - a nice, colorful, graphical representation
# https://git-scm.com/docs/git-log
# via https://medium.com/@payload.dd/thanks-for-the-git-st-i-will-use-this-4da5839a21a4
commend = commit --amend --no-edit
# https://hackernoon.com/lesser-known-git-commands-151a1918a60
s = status --short --branch
# https://hackernoon.com/lesser-known-git-commands-151a1918a60
[merge]
ff = only
# I pretty much never mean to do a real merge, since I use a rebase workflow.
# Note: this global option applies to all merges, including those done during a git pull
# https://git-scm.com/docs/git-config#git-config-mergeff
conflictstyle = diff3
# Standard diff is two sets of final changes. This introduces the original text before each side's changes.
# https://git-scm.com/docs/git-config#git-config-mergeconflictStyle
[commit]
gpgSign = true
[push]
default = simple
# "push the current branch back to the branch whose changes are usually integrated into the current branch"
# "refuse to push if the upstream branch’s name is different from the local one"
# https://git-scm.com/docs/git-config#git-config-pushdefault
followTags = true
# Because I get sick of telling git to do it manually
# https://git-scm.com/docs/git-config#git-config-pushfollowTags
[status]
showUntrackedFiles = all
# Sometimes a newly-added folder, since it's only one line in git status, can slip under the radar.
# https://git-scm.com/docs/git-config#git-config-statusshowUntrackedFiles
[transfer]
fsckobjects = true
# To combat repository corruption!
# Note: this global option applies during receive and transmit
# https://git-scm.com/docs/git-config#git-config-transferfsckObjects
# via https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0
# A nice little github-like colorful, split diff right in the console.
# via http://owen.cymru/github-style-diff-in-terminal-with-icdiff/
[diff]
tool = icdiff
[difftool]
prompt = false
[difftool "icdiff"]
cmd = /usr/local/bin/icdiff --line-numbers $LOCAL $REMOTE
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install brew modules
brew install git z
# Get Cask
brew tap caskroom/cask
# Install apps via Cask
## Productivity
brew cask install alfred
brew cask install airmail
brew cask install Caskroom/cask/spectacle
brew cask install spotify
## Work
brew cask install eloston-chromium
brew cask install firefox
brew cask install nextcloud
brew cask install iterm2
brew cask install omnifocus
brew cask install visual-studio-code
brew cask install transmit
## Security
brew cask install 1password
brew cask install keybase
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
# Add to .bash_profile
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# Install latest node
nvm install node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment