commit 96374a44e9944c4547ce8d1516c12d2ffd87b1c5
parent 2cef6efeb1066354e268ed7c1e261566765fd9ae
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 16 Apr 2020 11:02:48 +0200
Move git shorthands into git configuration and out of profile
Diffstat:
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/.gitconfig b/.gitconfig
@@ -6,12 +6,17 @@
[alias]
a = add
- c = commit -S -v
+ b = !git -P branch -a
+ c = commit -v
+ ca = commit -a -v
+ cp = !git commit -v && git push
+ cap = !git commit -a -v && git push
+ ch = diff HEAD^
+ d = !git -P diff --
p = push
- pu = pull
+ pu = !git pull && git fetch --all
l = log --pretty='format:%h %s%d' -n 20 --graph
tags = tag -l
- branches = branch -a
remotes = remote -v
s = status -sb
ss = s -uno
diff --git a/.profile b/.profile
@@ -16,6 +16,7 @@ export GPG_TTY
alias e='$EDITOR'
alias c=clear
alias r='fc -s'
+alias g=git
f() {
$EDITOR $(find "${1:-.}" -type f | fzy -l 25)
@@ -58,11 +59,10 @@ alias ll='l -l'
alias lo='l -alo'
alias dot="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME"
-alias dotcap="dot commit -a -S -v; dot push"
-alias m="make"
-alias mc="make clean"
-alias me="make edit"
+alias m='make'
+alias mc='make clean'
+alias me='make edit'
if type doas >/dev/null 2>&1; then
alias mi="doas make install"
else
@@ -80,18 +80,6 @@ alias date-uk='TZ=Europe/London date'
alias date-israel='TZ=Israel date'
alias now="plumb https://imgs.xkcd.com/comics/now.png"
-alias gs='git s'
-alias gss='git ss'
-alias ga='git add'
-alias gd='git -P diff --'
-alias gch='git diff HEAD^..HEAD'
-alias gc='git commit --verbose'
-alias gca='git commit --all --verbose'
-alias gp='git push'
-alias gpu='git pull && git fetch --all'
-alias gcgp='git commit --verbose && git push'
-alias gcagp='git commit --all --verbose && git push'
-
tsplit() {
if [ -z "$TMUX" ]; then
echo "error: not in tmux session" >&2
@@ -109,7 +97,7 @@ tsplit() {
fi
}
-alias w3m="w3m -B"
+alias w3m='w3m -B'
alias w3mtor='torsocks w3m -B "$@"'
ddg() {
w3m "https://duckduckgo.com/lite?q=$*&fd=-1"