-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig2
27 lines (26 loc) · 1.39 KB
/
gitconfig2
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
26
[user]
name = Rowan.Saunders
email = rowan.saunders@aac-clydespace.com
[diff]
tool = nvimdiff
[core]
editor = nvim
[init]
defaultBranch = main
[rerere]
enabled = true
autoUpdate = true
[pull]
rebase = true
[alias]
tree = log --graph --oneline --all
logd = log -p --compact-summary
slog = log -p -S
all = "!f() { RED='\\033[0;01;31m'; BLUE='\\033[0;01;03;34m'; GREEN='\\033[0;32;1m'; NC='\\033[0m'; echo \"\\n(git) ${RED}[${GREEN}$(basename $(pwd))${RED}] ${BLUE}($(git rev-parse --abbrev-ref HEAD))${NC} git $@\"; git -c color.ui=always $@; for path in `git submodule status --recursive | awk '// {print $2}'`; do echo \"(git) ${RED}[${GREEN}$path${RED}] ${BLUE}($(git -C $path rev-parse --abbrev-ref HEAD))${NC} git $@\"; git -C $path -c color.ui=always $@; done; }; f"
rej696 = "!f() { git config --local user.name 'rej696' && git config --local user.email 'r.f.t@hotmail.co.uk'; }; f"
stall = all status --short
stiff = all diff --compact-summary
stree = all log --graph --oneline -n 5 --abbrev-commit
stref = all reflog --oneline -n 5 --abbrev-commit
root = "!f() { path=$(git rev-parse --show-superproject-working-tree); if [ \"\" = \"$path\" ]; then path=$(git rev-parse --show-toplevel); fi; echo $path; }; f"
top = "!f() { path=\"$GIT_PREFIX\"; if [ \"\" = \"$path\" ]; then path=\"./\"; fi; realpath --relative-to=\"$path\" \"$(git root)\"; }; f"