Skip to content

Commit

Permalink
dry: First draft
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzleutgeb committed Oct 21, 2023
1 parent 59bea66 commit 7483f7c
Show file tree
Hide file tree
Showing 277 changed files with 338 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/git-a/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add
1 change: 1 addition & 0 deletions doc/git-aa/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add --all
1 change: 1 addition & 0 deletions doc/git-add-alias/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { if [ $# != 3 ]; then echo "Usage: git add-alias ( --local | --global ) <alias> <command>"; echo "Error: this command needs 3 arguments."; return 2; fi; if [ -n "$(git config "$1" --get alias."$2")" ]; then echo "Alias '$2' already exists, thus no change happened."; return 3; fi; git config "$1" alias."$2" "$3" && return 0; echo "Usage: git add-alias ( --local | --global ) <alias> <command>"; echo "Error: unknown failure."; return 1; }; f
1 change: 1 addition & 0 deletions doc/git-add-cached/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --cached | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-deleted/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --deleted | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-ignored/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --ignored | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-killed/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --killed | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-modified/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --modified | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-others/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --others | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-stage/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --stage | cut -f2 | sort -u)"
1 change: 1 addition & 0 deletions doc/git-add-unmerged/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git add "$(git ls-files --unmerged | cut -f2 | sort -u)"
1 change: 1 addition & 0 deletions doc/git-alias/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f(){ echo "Git Alias is project that has a collection of git alias commands."; echo "The purpose is to help make git easier, faster, and more capable."; echo "Free open source repository <https://github.com/gitalias/gitalias>."; echo ""; echo "To see your existing git aliases:"; echo " git aliases"; echo ""; echo "To see your existing git aliases by using git directly:"; echo " git config --get-regexp ^alias\."; };f
1 change: 1 addition & 0 deletions doc/git-aliases/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git config --get-regexp '^alias\.' | cut -c 7- | sed 's/ / = /'
1 change: 1 addition & 0 deletions doc/git-ap/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add --patch
1 change: 1 addition & 0 deletions doc/git-archive/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { top="$(rev-parse --show-toplevel)"; cd "$top" || exit 1 ; tar cvf "$top.tar" "$top" ; }; f
1 change: 1 addition & 0 deletions doc/git-assume-all/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git st -s | awk '{ print $2 }' | xargs -r git assume
1 change: 1 addition & 0 deletions doc/git-assume/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update-index --assume-unchanged
1 change: 1 addition & 0 deletions doc/git-assumed/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git ls-files -v | grep ^h | cut -c 3-
1 change: 1 addition & 0 deletions doc/git-au/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add --update
1 change: 1 addition & 0 deletions doc/git-b/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch
1 change: 1 addition & 0 deletions doc/git-bed/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch --edit-description
1 change: 1 addition & 0 deletions doc/git-bm/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch --merged
1 change: 1 addition & 0 deletions doc/git-bnm/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch --no-merged
1 change: 1 addition & 0 deletions doc/git-branch-commit-first/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { branch="${1:-$(git current-branch)}"; count="${2:-1}"; git log --reverse --pretty=%H "$branch" | head -"$count"; }; f
1 change: 1 addition & 0 deletions doc/git-branch-commit-last/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { branch="${1:-$(git current-branch)}"; count="${2:-1}"; git log --pretty=%H "$branch" | head -"$count"; }; f
1 change: 1 addition & 0 deletions doc/git-branch-commit-next/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { branch="${1:-$(git current-branch)}"; count="${2:-1}"; git log --reverse --pretty=%H "$branch" | grep -A "$count" "$(git rev-parse HEAD)" | tail +2; }; f
1 change: 1 addition & 0 deletions doc/git-branch-commit-prev/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { branch="${1:-$(git current-branch)}"; count="${2:-1}"; git log --pretty=%H "$branch" | grep -A "$count" "$(git rev-parse HEAD)" | tail +2; }; f
1 change: 1 addition & 0 deletions doc/git-branches/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch -a
1 change: 1 addition & 0 deletions doc/git-bsd/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f(){ branch="${1:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null)}"; git config "branch.$branch.description"; };f
1 change: 1 addition & 0 deletions doc/git-bv/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch --verbose
1 change: 1 addition & 0 deletions doc/git-bvv/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
branch --verbose --verbose
1 change: 1 addition & 0 deletions doc/git-c/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit
1 change: 1 addition & 0 deletions doc/git-ca/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --amend
1 change: 1 addition & 0 deletions doc/git-caa/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --amend --all
1 change: 1 addition & 0 deletions doc/git-caam/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --amend --all --message
1 change: 1 addition & 0 deletions doc/git-caane/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --amend --all --no-edit
1 change: 1 addition & 0 deletions doc/git-cam/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --amend --message
1 change: 1 addition & 0 deletions doc/git-cane/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --amend --no-edit
1 change: 1 addition & 0 deletions doc/git-chart/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log --format=oneline --format="%aE %at" --since=6-weeks-ago "$*" | awk ' function time_to_slot(t) { return strftime("%Y-%m-%d", t, true) } function count_to_char(i) { return (i > 0) ? ((i < 10) ? i : "X") : "." } BEGIN { time_min = systime(); time_max = 0; SECONDS_PER_DAY=86400; } { item = $1; time = 0 + $2; if (time > time_max){ time_max = time } else if (time < time_min){ time_min = time }; slot = time_to_slot(time); items[item]++; slots[slot]++; views[item, slot]++; } END{ printf("Chart time range %s to %s.\n", time_to_slot(time_min), time_to_slot(time_max)); time_max_add = time_max += SECONDS_PER_DAY; for(item in items){ row = ""; for(time = time_min; time < time_max_add; time += SECONDS_PER_DAY) { slot = time_to_slot(time); count = views[item, slot]; row = row count_to_char(count); } print row, item; } }'; }; f
1 change: 1 addition & 0 deletions doc/git-cherry-pick-merge/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sh -c 'git cherry-pick --no-commit --mainline 1 $0 && git log -1 --pretty=%P $0 | cut -b 42- > .git/MERGE_HEAD && git commit --verbose'
1 change: 1 addition & 0 deletions doc/git-churn/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log --all --find-copies --find-renames --name-only --format='format:' "$@" | awk 'NF{a[$0]++}END{for(i in a){print a[i], i}}' | sort -rn;};f
1 change: 1 addition & 0 deletions doc/git-ci/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --interactive
1 change: 1 addition & 0 deletions doc/git-cleaner/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
clean -dff
1 change: 1 addition & 0 deletions doc/git-cleanest/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
clean -dffx
1 change: 1 addition & 0 deletions doc/git-cleanout/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git clean -df && git checkout -- .
1 change: 1 addition & 0 deletions doc/git-clone-lean/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
clone --depth 1 --filter=combine:blob:none+tree:0 --no-checkout
1 change: 1 addition & 0 deletions doc/git-cloner/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
clone --recursive
1 change: 1 addition & 0 deletions doc/git-cm/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commit --message
1 change: 1 addition & 0 deletions doc/git-co/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checkout
1 change: 1 addition & 0 deletions doc/git-cob/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checkout -b
1 change: 1 addition & 0 deletions doc/git-commit-is-merge/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f(){ [ -n "$(git commit-parents "$*" | sed '0,/^parent /d')" ];};f
1 change: 1 addition & 0 deletions doc/git-commit-message-key-lines/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f(){ echo "Commit: $1"; git log "$1" --format=fuller | grep "^[[:blank:]]*[[:alnum:]][-[:alnum:]]*:" | sed "s/^[[:blank:]]*//; s/:[[:blank:]]*/: /"; }; f
1 change: 1 addition & 0 deletions doc/git-commit-parents/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f(){ git cat-file -p "${*:-HEAD}" | sed -n '/0/,/^ *$/{/^parent /p}'; };f
1 change: 1 addition & 0 deletions doc/git-cong/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checkout --no-guess
1 change: 1 addition & 0 deletions doc/git-cp/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cherry-pick
1 change: 1 addition & 0 deletions doc/git-cpa/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cherry-pick --abort
1 change: 1 addition & 0 deletions doc/git-cpc/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cherry-pick --continue
1 change: 1 addition & 0 deletions doc/git-cpn/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cherry-pick -n
1 change: 1 addition & 0 deletions doc/git-cpnx/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cherry-pick -n -x
1 change: 1 addition & 0 deletions doc/git-current-branch/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rev-parse --abbrev-ref HEAD
1 change: 1 addition & 0 deletions doc/git-cvs-e/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cvsexportcommit -u -p
1 change: 1 addition & 0 deletions doc/git-cvs-i/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cvsimport -k -a
1 change: 1 addition & 0 deletions doc/git-d/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff
1 change: 1 addition & 0 deletions doc/git-dc/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --cached
1 change: 1 addition & 0 deletions doc/git-dd/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff-deep
1 change: 1 addition & 0 deletions doc/git-debug/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GIT_PAGER='' gdb --args git
1 change: 1 addition & 0 deletions doc/git-default-branch/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config init.defaultBranch
1 change: 1 addition & 0 deletions doc/git-diff-all/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for name in $(git diff --name-only "$1"); do git difftool "$1" "$name" & done
1 change: 1 addition & 0 deletions doc/git-diff-changes/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --name-status -r
1 change: 1 addition & 0 deletions doc/git-diff-chunk/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git show "$1:$3" | sed -n "/^[^ ].*$4(/,/^}/p" > .tmp1 ; git show "$2:$3" | sed -n "/^[^ ].*$4(/,/^}/p" > .tmp2 ; git diff --no-index .tmp1 .tmp2 ; }; f
1 change: 1 addition & 0 deletions doc/git-diff-deep/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --check --dirstat --find-copies --find-renames --histogram --color
1 change: 1 addition & 0 deletions doc/git-diff-staged/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --cached
1 change: 1 addition & 0 deletions doc/git-diff-stat/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --stat --ignore-space-change -r
1 change: 1 addition & 0 deletions doc/git-discard/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checkout --
1 change: 1 addition & 0 deletions doc/git-ds/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --staged
1 change: 1 addition & 0 deletions doc/git-dw/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diff --word-diff
1 change: 1 addition & 0 deletions doc/git-edit-cached/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --cached | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-deleted/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --deleted | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-ignored/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --ignored | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-killed/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --killed | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-modified/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --modified | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-others/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --others | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-stage/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --stage | cut -f2 | sort -u)"
1 change: 1 addition & 0 deletions doc/git-edit-unmerged/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(git var GIT_EDITOR) "$(git ls-files --unmerged | cut -f2 | sort -u)"
1 change: 1 addition & 0 deletions doc/git-exec/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exec
1 change: 1 addition & 0 deletions doc/git-expunge/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git filter-branch --force --index-filter "git rm --cached --ignore-unmatch $1" --prune-empty --tag-name-filter "cat" -- --all ; }; f
1 change: 1 addition & 0 deletions doc/git-f/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fetch
1 change: 1 addition & 0 deletions doc/git-fa/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fetch --all
1 change: 1 addition & 0 deletions doc/git-fav/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fetch --all --verbose
1 change: 1 addition & 0 deletions doc/git-fixup/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { TARGET="$(git rev-parse "$1")"; git commit --fixup="$TARGET" && GIT_EDITOR=true git rebase --interactive --autosquash "$TARGET"~; }; f
1 change: 1 addition & 0 deletions doc/git-g/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grep
1 change: 1 addition & 0 deletions doc/git-get/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git fetch --prune && git pull --rebase && git submodule update --init --recursive
1 change: 1 addition & 0 deletions doc/git-gg/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grep-group
1 change: 1 addition & 0 deletions doc/git-gitk-conflict/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gitk --left-right HEAD...MERGE_HEAD
1 change: 1 addition & 0 deletions doc/git-gitk-history-all/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gitk --all "$(git fsck | awk '/dangling commit/ {print $3}')"
1 change: 1 addition & 0 deletions doc/git-gn/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grep -n
1 change: 1 addition & 0 deletions doc/git-graphviz/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' "$@" | sed 's/[0-9a-f][0-9a-f]*/"&"/g' ; echo '}'; }; f
1 change: 1 addition & 0 deletions doc/git-grep-ack/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-c color.grep.linenumber="bold yellow" -c color.grep.filename="bold green" -c color.grep.match="reverse yellow" grep --break --heading --line-number
1 change: 1 addition & 0 deletions doc/git-grep-all/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git rev-list --all | xargs git grep "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-grep-group/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grep --break --heading --line-number --color
1 change: 1 addition & 0 deletions doc/git-heads/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log origin/main.. --format='%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset' | git name-rev --stdin --always --name-only | column -t -s';'
1 change: 1 addition & 0 deletions doc/git-hew-dry-run/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git hew-local-dry-run "$@" && git hew-remote-dry-run "$@" #
1 change: 1 addition & 0 deletions doc/git-hew-local-dry-run/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { commit=${1:-$(git current-branch)}; git branch --merged "$commit" | grep -v "^[[:space:]]*\*[[:space:]]*$commit$" ; }; f "$@"
1 change: 1 addition & 0 deletions doc/git-hew-local/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git hew-local-dry-run "$@" | xargs git branch --delete ; }; f "$@"
1 change: 1 addition & 0 deletions doc/git-hew-remote-dry-run/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { commit=${1:-$(git upstream-branch)}; git branch --remotes --merged "$commit" | grep -v "^[[:space:]]*origin/$commit$" | sed 's#[[:space:]]*origin/##' ; }; f "$@"
1 change: 1 addition & 0 deletions doc/git-hew-remote/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git hew-remote-dry-run "$@" | xargs -I% git push origin :% 2>&1 ; }; f "$@"
1 change: 1 addition & 0 deletions doc/git-hew/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git hew-local "$@" && git hew-remote "$@" #
1 change: 1 addition & 0 deletions doc/git-ignore/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git status | grep -P "^\t" | grep -vF .gitignore | sed "s/^\t//" >> .gitignore
1 change: 1 addition & 0 deletions doc/git-inbound/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git remote update --prune
1 change: 1 addition & 0 deletions doc/git-init-empty/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git init && git commit --allow-empty --allow-empty-message --message ''; }; f
1 change: 1 addition & 0 deletions doc/git-initer/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
init-empty
1 change: 1 addition & 0 deletions doc/git-intercommit/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sh -c 'git show $1 > .git/commit1 && git show $2 > .git/commit2 && interdiff .git/commit[12] | less -FRS' -
1 change: 1 addition & 0 deletions doc/git-issues/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sh -c "git log $1 --oneline | grep -o \"ISSUE-[0-9]\+\" | sort -u"
1 change: 1 addition & 0 deletions doc/git-l/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log
1 change: 1 addition & 0 deletions doc/git-last-tag/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
describe --tags --abbrev=0
1 change: 1 addition & 0 deletions doc/git-last-tagged/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git describe --tags "$(git rev-list --tags --max-count=1)"
1 change: 1 addition & 0 deletions doc/git-lfp/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --first-parent
1 change: 1 addition & 0 deletions doc/git-lg/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --graph
1 change: 1 addition & 0 deletions doc/git-ll/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log-list
1 change: 1 addition & 0 deletions doc/git-lll/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log-list-long
1 change: 1 addition & 0 deletions doc/git-lo/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --oneline
1 change: 1 addition & 0 deletions doc/git-log-1-day/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --since=1-day-ago
1 change: 1 addition & 0 deletions doc/git-log-1-hour/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --since=1-hour-ago
1 change: 1 addition & 0 deletions doc/git-log-1-month/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --since=1-month-ago
1 change: 1 addition & 0 deletions doc/git-log-1-week/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --since=1-week-ago
1 change: 1 addition & 0 deletions doc/git-log-1-year/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --since=1-year-ago
1 change: 1 addition & 0 deletions doc/git-log-date-first/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --date-order --format=%cI | tail -1
1 change: 1 addition & 0 deletions doc/git-log-date-last/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log -1 --date-order --format=%cI
1 change: 1 addition & 0 deletions doc/git-log-fetched/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --oneline HEAD..origin/main
1 change: 1 addition & 0 deletions doc/git-log-fresh/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log ORIG_HEAD.. --stat --no-merges
1 change: 1 addition & 0 deletions doc/git-log-graph/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --graph --all --oneline --decorate
1 change: 1 addition & 0 deletions doc/git-log-list-long/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --graph --topo-order --date=iso8601-strict --no-abbrev-commit --decorate --all --boundary --pretty=format:'%Cblue%ad %C(auto)%h%Creset -%C(auto)%d%Creset %s %Cblue[%aN <%aE>]%Creset %Cblue%G?%Creset'
1 change: 1 addition & 0 deletions doc/git-log-list/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --graph --topo-order --date=short --abbrev-commit --decorate --all --boundary --pretty=format:'%Cblue%ad %C(auto)%h%Creset -%C(auto)%d%Creset %s %Cblue[%aN]%Creset %Cblue%G?%Creset'
1 change: 1 addition & 0 deletions doc/git-log-local/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --oneline origin..HEAD
3 changes: 3 additions & 0 deletions doc/git-log-local/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# git log-local

<!-- TODO -->
1 change: 1 addition & 0 deletions doc/git-log-my-day/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --author "$(git config user.email)" --since=1-day-ago
1 change: 1 addition & 0 deletions doc/git-log-my-hour/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --author "$(git config user.email)" --since=1-hour-ago
1 change: 1 addition & 0 deletions doc/git-log-my-month/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --author "$(git config user.email)" --since=1-month-ago
1 change: 1 addition & 0 deletions doc/git-log-my-week/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --author "$(git config user.email)" --since=1-week-ago
1 change: 1 addition & 0 deletions doc/git-log-my-year/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --author "$(git config user.email)" --since=1-year-ago
1 change: 1 addition & 0 deletions doc/git-log-my/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log --author "$(git config user.email)"
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-day-of-week/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%u" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-day/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%Y-%m-%d" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-email/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format "%aE" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-format-with-date/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { format="$1"; shift; date_format="$1"; shift; git log "$@" --format=oneline --format="$format" --date=format:"$date_format" | awk '{a[$0]++}END{for(i in a){print a[i], int((a[i]/NR)*100) "%", i}}' | sort -nr; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-format/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { format="$1"; shift; git log "$@" --format=oneline --format="$format" | awk '{a[$0]++}END{for(i in a){print a[i], int((a[i]/NR)*100) "%", i}}' | sort -nr; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-hour-of-day/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%H" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-hour/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%Y-%m-%dT%H" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-month/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%Y-%m" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-week-of-year/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%V" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-week/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%Y#%V" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-count-and-year/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-count-and-format-with-date "%ad" "%Y" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-day-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%Y-%m-%d" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-day-of-week-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%u" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-email-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count "%aE" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-format-and-count-with-date/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { format="$1"; shift; date_format="$1"; shift; git log "$@" --format=oneline --format="$format" --date=format:"$date_format" | awk '{a[$0]++}END{for(i in a){print i, a[i], int((a[i]/NR)*100) "%"}}' | sort -r; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-format-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { format="$1"; shift; git log "$@" --format=oneline --format="$format" | awk '{a[$0]++}END{for(i in a){print i, a[i], int((a[i]/NR)*100) "%"}}' | sort; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-hour-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%Y-%m-%dT%H" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-hour-of-day-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%H" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-month-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%Y-%m" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-week-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%Y#%V" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-week-of-year-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%V" "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-log-of-year-and-count/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git log-of-format-and-count-with-date "%ad" "%Y" "$@" ; }; f
1 change: 1 addition & 0 deletions doc/git-log-refs/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --all --graph --decorate --oneline --simplify-by-decoration --no-merges
1 change: 1 addition & 0 deletions doc/git-log-timeline/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --format='%h %an %ar - %s'
1 change: 1 addition & 0 deletions doc/git-lor/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --oneline --reverse
1 change: 1 addition & 0 deletions doc/git-lp/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --patch
1 change: 1 addition & 0 deletions doc/git-ls/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls-files
1 change: 1 addition & 0 deletions doc/git-lsd/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls-files --debug
1 change: 1 addition & 0 deletions doc/git-lsfn/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls-files --full-name
1 change: 1 addition & 0 deletions doc/git-lsio/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls-files --ignored --others --exclude-standard
1 change: 1 addition & 0 deletions doc/git-lto/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log --topo-order
1 change: 1 addition & 0 deletions doc/git-m/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
merge
1 change: 1 addition & 0 deletions doc/git-ma/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
merge --abort
1 change: 1 addition & 0 deletions doc/git-mainly/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git checkout "$(git default-branch)" && git fetch origin --prune && git reset --hard "origin/$(git default-branch)"
1 change: 1 addition & 0 deletions doc/git-mc/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
merge --continue
1 change: 1 addition & 0 deletions doc/git-merge-span-diff/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git diff "$(git merge-span ... "$1")"
1 change: 1 addition & 0 deletions doc/git-merge-span-difftool/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git difftool "$(git merge-span ... "$1")"
1 change: 1 addition & 0 deletions doc/git-merge-span-log/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git log "$(git merge-span .. "$1")"
1 change: 1 addition & 0 deletions doc/git-merge-span/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { echo "$(git log -1 "$2" --merges --pretty=format:%P | cut -d' ' -f1)$1$(git log -1 "$2" --merges --pretty=format:%P | cut -d' ' -f2)"; }; f
1 change: 1 addition & 0 deletions doc/git-mncnf/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
merge --no-commit --no-ff
1 change: 1 addition & 0 deletions doc/git-move-alias/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { if [ $# != 3 ]; then echo "Usage: git move-alias ( --local | --global ) <alias existing name> <new alias name>"; echo "Error: this command needs 3 arguments."; return 2; fi; if [ "$2" = "$3" ]; then echo "The alias names are identical, thus no change happened."; return 3; fi; if [ -z "$(git config "$1" --get alias."$2")" ]; then echo "Alias '$2' does not exist, thus no change happened."; return 4; fi; if [ -n "$(git config "$1" --get alias."$3")" ]; then echo "Alias '$3' already exists, thus no change happened."; return 5; fi; git config "$1" alias."$3" "$(git config "$1" --get alias."$2")" && git config "$1" --unset alias."$2" && return 0; echo "Usage: git move-alias ( --local | --global ) <alias existing name> <alias new name>"; echo "Error: unknown failure."; return 1; };f
1 change: 1 addition & 0 deletions doc/git-o/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checkout
1 change: 1 addition & 0 deletions doc/git-optimizer/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git pruner
1 change: 1 addition & 0 deletions doc/git-orphans/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fsck --full
1 change: 1 addition & 0 deletions doc/git-ours/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f() { git checkout --ours "$@" && git add "$@"; }; f
1 change: 1 addition & 0 deletions doc/git-outbound/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
log @{upstream}..
1 change: 1 addition & 0 deletions doc/git-p/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pull
1 change: 1 addition & 0 deletions doc/git-panic/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tar cvf ../panic.tar -- *
1 change: 1 addition & 0 deletions doc/git-pf/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pull --ff-only
1 change: 1 addition & 0 deletions doc/git-pr/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pull --rebase
1 change: 1 addition & 0 deletions doc/git-prp/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pull --rebase=preserve
1 change: 1 addition & 0 deletions doc/git-pruner/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all
1 change: 1 addition & 0 deletions doc/git-publish/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git push --set-upstream origin "$(git current-branch)"
1 change: 1 addition & 0 deletions doc/git-pull1/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git pull origin "$(git current-branch)"
1 change: 1 addition & 0 deletions doc/git-push1/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git push origin "$(git current-branch)"
1 change: 1 addition & 0 deletions doc/git-pushy/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git push --force-with-lease
1 change: 1 addition & 0 deletions doc/git-put/alias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git commit --all && git push
1 change: 1 addition & 0 deletions doc/git-rb/alias.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rebase
Loading

0 comments on commit 7483f7c

Please sign in to comment.