# Sravan Balaji's Git Configuration # Based on: https://gist.github.com/tdd/470582 [user] email = balajsra@umich.edu name = Sravan Balaji [color] # Enable colors in color-supporting terminals ui = auto [pull] rebase = true [alias] # List available aliases aliases = !git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g' # Command shortcuts ci = commit co = checkout st = status # Display tree-like log, because default log is a pain… lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset' # Useful when you have to update your last commit # with staged files without editing the commit message. oops = commit --amend --no-edit # Ensure that force-pushing won't lose someone else's work (only mine). push-with-lease = push --force-with-lease # Rebase won’t trigger hooks on each "replayed" commit. # This is an ugly hack that will replay each commit during rebase with the # standard `commit` command which will trigger hooks. rebase-with-hooks = rebase -x 'git reset --soft HEAD~1 && git commit -C HEAD@{1}' # List local commits that were not pushed to remote repository review-local = "!git lg @{push}.." # Edit last commit message reword = commit --amend # Undo last commit but keep changed files in stage uncommit = reset --soft HEAD~1 # Remove file(s) from Git but not from disk untrack = rm --cache -- [core] # Emacs editor = "emacs" # Don't consider trailing space change as a cause for merge conflicts whitespace = -trailing-space [diff] # Use better, descriptive initials (c, i, w) instead of a/b. mnemonicPrefix = true # Show renames/moves as such renames = true # When using --word-diff, assume --word-diff-regex=. wordRegex = . # Display submodule-related information (commit listings) submodule = log [fetch] # Auto-fetch submodule changes (sadly, won't auto-update) recurseSubmodules = on-demand [grep] break = true heading = true lineNumber = true # Consider most regexes to be ERE extendedRegexp = true [log] # Use abbrev SHAs whenever possible/relevant instead of full 40 chars abbrevCommit = true # Automatically --follow when given a single path follow = true # Disable decorate for reflog # (because there is no dedicated `reflog` section available) decorate = false [status] # Display submodule rev change summaries in status submoduleSummary = true # Recursively traverse untracked directories to display all contents showUntrackedFiles = all