Your gitconfig/gitalias
Posted: Sun Oct 23, 2016 5:23 am
mine looks like this:
EDIT: alignment
As of lately, i prefer fzy https://github.com/jhawthorn/fzy over fzf due to its binary size (and compiling fzf on ARM device is a pain in the butt).
I think this is messy as fuck, and probably a lot better if i write it in a bash-script.... but i'm too lazy for that.
Now show me yours.
Code: Select all
[alias]
s = status --short
# pretty log
lp = log --max-count=50 --pretty=format:"%h%x09%d%x20%s"
up='git fetch && git rebase --autostach FETCH_HEAD'
lns = ls-files --other --directory --exclude-standard --cached
cur = rev-parse --abbrev-ref HEAD
rec = !git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | head -n 10
poc = !git push origin $(git cur)
rmt = !git remote -v | grep '@.*fetch' | sed 's/.*:\\(.*\\).git.*/\\1/g'
pr = !firefox https://github.com/$(git rmt)/compare/$(git cur)?expand=1
# FZF / FZY stuff
# prefixed with f-
# fuzzy checkout
fco = !git checkout $(git rec | fzy)
# fuzzy show log
fsl = !_hash=$(git lp | fzy) && git show ${_hash%% *}
# fuzzy commit sha copy
fcl = !_hash=$(git lp | fzy) && echo ${_hash%% *} | xclip
# fuzzy interactive rebase
frb = !_hash=$(git lp | fzy) && git rebase -i ${_hash%% *}
# edit un-committed file(s)
feu = !_files=$(git s | cut -d ' ' -f2- | fzf-tmux -m) && $EDITOR ${_files}
# edit already pushed file(s)
fec = !_hash=$(git lp | fzf-tmux -m) && _files=$(git show --pretty='format:' --name-only ${_hash%% *} | fzf-tmux -m) && $EDITOR ${_files}
# fuzzy git-reset to ${SHA_COMMIT}
frs = !_hash=$(git lp | fzf-tmux) && git reset --soft ${_hash%% *}
As of lately, i prefer fzy https://github.com/jhawthorn/fzy over fzf due to its binary size (and compiling fzf on ARM device is a pain in the butt).
I think this is messy as fuck, and probably a lot better if i write it in a bash-script.... but i'm too lazy for that.
Now show me yours.