-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.git_aliases
25 lines (23 loc) · 852 Bytes
/
.git_aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Sourced by ~/.gitconfig, using:
# [include]
# path = .git_aliases
[alias]
ls = log --pretty=\"%Cred%h%Creset%x20%cr%Cblue%d%Creset%x20%C(cyan)%cN%Creset%x20%s\" --decorate=short --color --graph
ll = log --pretty=format:\"%Cred%h%C(yellow)%d\\ %Creset%s%C(cyan)\\ [%cn]\" --decorate --numstat
st = status -s
open = "!f() { \
REPO_URL=$(git config remote.origin.url); \
if ! [[ -z $REPO_URL ]]; then \
echo opening url: ${REPO_URL%%.git}; \
if type open &>/dev/null; then \
open ${REPO_URL%%.git}; \
elif type xdg-open &>/dev/null; then \
xdg-open ${REPO_URL%%.git}; \
else \
echo error: unable to find open tool; \
fi; \
fi; \
}; f"
browse = "!git open"
cleanup-branches = "!git branch --merged | grep -v -E '^\\*|main|master|develop' | xargs -n1 git branch -d"
# vim: ft=gitconfig