My .gitconfig file

6 thoughts on “My .gitconfig file”

  1. I like ‘oops’, I will cherry-pick it. Here is mine: (credit goes to @tibor and @akos, don’t know anymore which line belongs to who):

    lol = log --oneline --decorate --graph -n 15
    lola = log --oneline --decorate --graph -n 15 --all
    co = checkout
    rh = reset --hard
    save = stash save
    pop = stash pop --index
    restash = !git stash pop  --index && git stash save
    rs = !git stash pop  --index && git stash save
    s = status
    files = diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT
    fixup = !sh -c 'git commit -m "fixup! $(git log -1 --format='\''%s'\'' $@)"' -
    squash = !sh -c 'git commit -m "squash! $(git log -1 --format='\''%s'\'' $@)"' -
    ri = rebase --interactive --autosquash
    f = fetch --all --tags --prune
    hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
    rev = log -1 --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
    1. That’s a nice follow up! I don’t really use git log (I use gitk for that kind of things), but your some of your aliases make git log a bit more interesting, thanks!

  2. I like lola… :)

    Some missing:

    autosetuprebase = always ## strongly recommended
    logallrefupdates = true
    myinit = "!git init && git commit -m "Initial, empty commit" --allow-empty && git branch root"
    conflictstyle = diff3
    1. I don’t really use Git GUI either, only when I have been lazy and neglected to commit changes for a while. It then becomes a bit too messy to handle via command line :)

      I will give GitX a try then, it seems cool! Thanks!

Comments are closed.