diff --git a/.config/git/config b/.config/git/config index 6a6b41e..ac49a80 100644 --- a/.config/git/config +++ b/.config/git/config @@ -73,6 +73,7 @@ stb = status --short --branch sv = --paginate status -v svv = --paginate status -vv + sf = !git diff-index HEAD --name-only | fzf --preview='git diff HEAD --color=always -- {}' --multi | git commit -v --pathspec-from-file=- r = remote -v b = branch -vv @@ -94,7 +95,7 @@ #dir = !git root | sed 's/$/\\/.git/' | grep --color=never "/" # grep ensures a proper exit status on fail lg = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --graph - lgo = lg HEAD @{push} + lgu = lg HEAD @{push} lo = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges lp = log -p --date=local ln = !git --no-pager lo "-$(a=$(git rev-list --count HEAD...@{push} 2>/dev/null); expr $a + 3 \\& ${a:-0} \\> 3 \\| 6)" --color=always --graph HEAD @{u} 2>/dev/null | head -9 || git --no-pager lo -7 diff --git a/.local/bin/scripts/git-rmgonebranches b/.local/bin/scripts/git-rmgonebranches index f7a1349..33366e1 100755 --- a/.local/bin/scripts/git-rmgonebranches +++ b/.local/bin/scripts/git-rmgonebranches @@ -1,6 +1,6 @@ #!/bin/sh # Cleans up remote branches and removes branches where the remote-tracking branches got removed. -git fetch -p && +git fetch --prune && for branch in `git branch -vv | grep ": gone]" | cut -d" " -f3` do git branch -D "$branch" done