Skip to content

Instantly share code, notes, and snippets.

@ekilah
Created January 5, 2018 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekilah/031ab11b2daf1caacfc397e7c943cb32 to your computer and use it in GitHub Desktop.
Save ekilah/031ab11b2daf1caacfc397e7c943cb32 to your computer and use it in GitHub Desktop.
git config
[user]
name = YOUR NAME
email = YOUR@EMAIL.COM
[color]
ui = auto
[push]
default = simple
[alias]
co = checkout
st = status
std = !git st && git diff
df = !git diff --
d = diff
pushup = "!gitbranchname() { git symbolic-ref --short HEAD; }; gitpushupstream() { git push --set-upstream origin `gitbranchname`; }; gitpushupstream"
subs = "!gitupdatesubs() { git submodule foreach 'git co $(cd ..; git symbolic-ref --short HEAD); git pull' ; }; gitupdatesubs"
amend = !git add . && git commit --amend --no-edit
branches = for-each-ref --count=30 --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))'
[branch]
autosetupmerge = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment