Skip to content

Instantly share code, notes, and snippets.

@skibish
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save skibish/478b0ce08c676eeed217 to your computer and use it in GitHub Desktop.
Save skibish/478b0ce08c676eeed217 to your computer and use it in GitHub Desktop.
GitHub configuration

To limit pushes to your current branch:

$ git config --global push.default simple

To default all new branches to fetch and rebase - not merge:

$ git config --global branch.autosetuprebase always

To record any merge conflict resolutions and reuse them automatically:

$ git config --global rerere.enabled true

To colorize git’s output for increased readability:

$ git config --global color.ui true

To create a git s alias (for short and easy readable status):

$ git config --global alias.s "status -s"

To create a git lg alias (cool one line log output):

$ git config --global alias.lg "log --oneline --decorate --all --graph"

To configure line endings correctly on Linux/Mac:

$ git config --global core.autocrlf input

To configure line endings correctly on Windows:

$ git config --global core.autocrlf true

To delete all branches that are already merged into the currently checked out branch:

$ git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment