From 5efec4e101cda6d1a5fccc8ced8ddb8e3fd1d367 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sun, 2 May 2021 19:37:18 +0200 Subject: [PATCH] config/git: update user.name & add gcn alias --- .config/git/config | 6 +++--- .config/shell/git | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.config/git/config b/.config/git/config index 2c86d8a..6ac3955 100644 --- a/.config/git/config +++ b/.config/git/config @@ -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 diff --git a/.config/shell/git b/.config/shell/git index a2802b3..3034fff 100644 --- a/.config/shell/git +++ b/.config/shell/git @@ -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