config/git: update user.name & add gcn alias

This commit is contained in:
xeruf 2021-05-02 19:37:18 +02:00
parent d2cb20a8b7
commit 5efec4e101
2 changed files with 16 additions and 3 deletions

View File

@ -48,7 +48,7 @@
[user]
email = 27jf@pm.me
name = xerus2000
name = xeruf
[mailmap]
file = /home/janek/.config/yadm/.mailmap
@ -113,10 +113,10 @@
cme = commit -v --edit --message
cp = cherry-pick
rb = rebase
rb = rebase --autostash
rbi = rebase --interactive
rbc = rebase --continue
rbm = !git rebase $(git main)
rbm = !git rb $(git main)
sta = stash
stl = !git --no-pager stash list

View File

@ -9,6 +9,19 @@ yc() {
yadm commit -v --template /tmp/yc-msg ${@:2} -- "$XDG_CONFIG_HOME/$1"
}
gcn() {
if test $# -eq 0 || test -e $1
then
fulldir="$(realpath ${1:-$PWD})"
dir="${fulldir#$DATA/*/}"
else
dir="notes/$1"
fulldir="$DATA/2-standards/$dir"
fi
echo "$dir:" >/tmp/gcn-msg
git commit -v --template /tmp/gcn-msg ${@:2} -- $fulldir
}
# if in home or under XDG_CONFIG_HOME and not within a git directory, replace git by yadm
git() {
case "$1" in