2023-08-13 19:34:14 +00:00
|
|
|
[include]
|
|
|
|
path = custom
|
|
|
|
|
2017-10-18 00:12:57 +00:00
|
|
|
[push]
|
|
|
|
default = simple
|
|
|
|
|
|
|
|
[alias]
|
2023-08-13 19:34:14 +00:00
|
|
|
# main-branch outputs 'main' if there is a main branch, otherwise it outputs
|
|
|
|
# 'master'
|
2023-08-15 16:42:49 +00:00
|
|
|
main-branch = "!if git rev-parse --verify main 2>&1 >/dev/null; then echo 'main'; else echo 'master'; fi"
|
2023-08-13 19:34:14 +00:00
|
|
|
|
2017-10-18 00:12:57 +00:00
|
|
|
#Shows diff in log
|
|
|
|
ll = log --stat --abbrev-commit
|
|
|
|
|
|
|
|
#Show all aliases
|
|
|
|
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort
|
|
|
|
|
|
|
|
#Full sync of local database
|
|
|
|
sync = fetch -pv --all
|
|
|
|
|
|
|
|
cam = commit -a -m
|
|
|
|
lug = log --color --graph --date=short --pretty=format:'%Cgreen%cd (%cr)%Creset %C(bold blue)%an%Creset %Cred%h%Creset -%C(yellow)%d%Creset %s' --abbrev-commit
|
|
|
|
purr = pull --rebase
|
|
|
|
chk = checkout
|
2023-08-13 19:34:14 +00:00
|
|
|
from = !git fetch origin "$(git main-branch)" && git rebase -i origin/"$(git main-branch)"
|
2017-10-18 00:12:57 +00:00
|
|
|
|
|
|
|
# print local branches and their last commit times
|
|
|
|
blanch = for-each-ref --sort=authordate --format '%(HEAD)%(align:left,40)%(refname:short)%(end) | %(align:left,20)%(authordate:iso)%(end) | %(subject)' refs/heads
|
|
|
|
|
2023-08-13 19:34:14 +00:00
|
|
|
# checkout master/main and delete previously checked out branch
|
|
|
|
close = !git checkout "$(git main-branch)" && git branch -D @{-1}
|
2017-10-18 00:12:57 +00:00
|
|
|
|
|
|
|
[color]
|
|
|
|
branch = auto
|
|
|
|
diff = auto
|
|
|
|
status = auto
|
2023-08-13 19:34:14 +00:00
|
|
|
|