There lives a dotfile ~/.gitconfig
, it lives in your home folder. It's a personal configuration file for the Git version control system on your machine. You can do a little bit of customization to really pimp out your Git game.
vim ~/.gitconfig
:
Here's my Config dotfile. I have the aliases commented as to what they do.
[user] name = name email = email@mail.com [alias] # status short & branch s = status -s -b # add, commit ac = !git add -A && git commit -m # add, commit, push acp = "!f() { git add -A && git commit -m \"$@\" && git push; }; f" # get all new content get = !git pull --rebase && git submodule update --init --recursive # go to root grt = !cd $(git rev-parse --show-toplevel) # push current branch pu = !git push -u origin $(git branch-name) # what changed (detailed log) w = whatchanged # log l = log # log simpler lol = "log --graph --decorate --oneline" # log simple logd = "log --date-order --all --graph --format='%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s'" # log fancy logf = "log --date-order --all --graph --name-status --format='%C(green)%H%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s'" # what have i changed since yesterday logg = !git log --since yesterday --pretty=short --author `git config user.email` [core] editor = subl -n -w compression = 0 [color] ui = true [merge "npm-merge-driver"] name = automatically merge npm lockfiles driver = npx npm-merge-driver merge %A %O %B %P [http] postBuffer = 500M maxRequestBuffer = 100M [merge] tool = sublimerge [diff] tool = sublimerge [fetch] prune = true [format] pretty = "%H %ci %ce %ae %d %s"