Skip to content

Instantly share code, notes, and snippets.

@tiagojdf
Last active July 6, 2021 10:59
Show Gist options
  • Save tiagojdf/115ecac229e176e48d520c59b022e4fb to your computer and use it in GitHub Desktop.
Save tiagojdf/115ecac229e176e48d520c59b022e4fb to your computer and use it in GitHub Desktop.
My gitconfig
[user]
name = Firstname Lastname
email = [email protected]
[alias]
co = checkout
cot = "!f() { git branch | grep $1 | xargs -I {} git co {}; }; f"
b = branch
pu = push -u origin HEAD
ci = commit
st = status
ap = add --patch
rename = branch -m
rn = rename
clean-merged = ! git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d
age = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
rc = rebase --continue
rs = rebase --skip
cc = cherry-pick --continue
cs = cherry-pick --skip
[core]
editor = vim
[push]
default = simple
@tiagojdf
Copy link
Author

tiagojdf commented Apr 7, 2017

New aliases:
cot - magical checkout that works with partial branch name
clean-merged - deletes branches that were merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment