Skip to content

Instantly share code, notes, and snippets.

@mujuni88
Created February 4, 2019 20:59
Show Gist options
  • Save mujuni88/0205bbc55d2aaec5181eb1e132bed152 to your computer and use it in GitHub Desktop.
Save mujuni88/0205bbc55d2aaec5181eb1e132bed152 to your computer and use it in GitHub Desktop.
[user]
name = Joe Buza
email = joebm08@gmail.com
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
cmt = commit
cam = commit -am
st = status
br = branch
co = checkout
df = diff
dc = diff --cached
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files
please = push --force-with-lease
undo = reset --soft HEAD^
recommit = commit -a -c ORIG_HEAD
commend = commit --amend --no-edit
stsh = stash --keep-index
staash = stash --include-untracked
staaash = stash --all
shorty = status --short --
merc = merge --no-ff
br-ac = branch --sort=committerdate
br-desc = branch --sort=-committerdate
stash-untracked = "!f() { \
git stash; \
git stash -u; \
git stash pop stash@{1}; \
}; f"
tags = log --tags --simplify-by-decoration --pretty="format:%ci %d"
ign = ls-files -o -i --exclude-standard
pr = "!f() { git fetch -fu ${2:-upstream} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
pr-clean = "!git checkout master ; git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
commadd= "!git add -A ; git commend"
cleanup = !git-both-merged
pullall = '!git pull && git submodule update --init --recursive'
[push]
default = matching
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[commit]
template = ~/.git-commit-template.txt
[core]
editor = vim
[fetch]
prune = true
[merge]
tool = vimdiff
[mergetool]
prompt = true
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[difftool]
prompt = false
[diff]
tool = vimdiff
[github]
user = mujuni88
[rerere]
enabled = true
[submodule]
recurse = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment