[pretty] concise = %C(yellow)%h%C(reset) %s %C(bold black)(%an, %ar)%C(reset)%C(bold blue)%d%C(reset) [alias] # When doing "git git log" or some such, do not complain about "git" not # being a valid Git command. This happens when copy-pasting examples, for # instance. git = !git # Show a concise status of the working directory, along with the branch # and the number of commits behind and/or ahead. st = status --short --branch # Quickly push to the most common destination. pom = push origin master # Quickly push to the origin po = push origin # Quickly pull from the origin pu = pull origin # I know "pum" could just as well stand for "PUsh" instead of "PUll", but # I am so used to "git pom" that "git pum" feels like a natural # counterpart. I always try to rebase to prevent unnecessary merge # commits. pum = pull --rebase origin master # Show the staged changes. dc = diff --cached # Commit ci = commit # Like "git show myfile", but uses the last commit that changed "myfile". sl = log -n 1 -p # Switch branches, creating them if necessary. I want to unlearn using # "git checkout" for switching between branches because of the possible # dataloss when not paying attention. (You could see the PEBKAC, but I # could reply with another four letter acronym, slightly resembling TOFU.) # # Suppose I have modified a file named "password" and have two branches, # "password-expiry-mechanism" and "password-reset-mail". If I want to # switch to either branch, I would type "git checkout pass", # but the autocomplete would stop at "git checkout password" because of # the ambiguity. Because I press without really thinking, I have # now reset my "password" file. With "git go pass", I would # simply have created a new branch called "password". (I would be forced # to use "--" to separate paths from banch names, which is a Good Thing™.) cob = checkout -B co = checkout # Make life easier, we only need git aa to add/remove git files aa = add --all # Show pretty log ll = !git pgl --all # Show only 20 git log items l = !git pgl -20 # Show a git log with detailed log information. pgl = "!source ~/.githelpers && pretty_git_log" [core] excludesfile = ~/.gitignore autocrlf = input safecrlf = true [color] ui = true [merge] tool = vimdiff