Command Closure Templates
June 27, 2019 ยท View on GitHub
Below is a list of pre-built command closures with example usage, to help illustrate how git-extend works.
Template files are located in the templates directory.
Pre-built Templates
Usage
-
git-add-
%n: Add pathspec at indexn, referenced via the list fromgit status --numbered. Index starts at1.git add %1
-
-
git-branch-
--last,-L: Get the name of the last branch.git branch --last # -> fix/bug
-
-
git-checkout-
-T: ResolveHEADto<COMMIT_SHA>, uset/<COMMIT_SHA>as branch name.git checkout -b -T
-
-
git-diff-
--sxs: Show side-by-side diff.git diff --sxs
-
-
git-log-
--all: Get all commits (equivalent to--max-count=<TOTAL>).git log --all -
--last: Get lastncommits (equivalent to--max-count=<NUMBER>).git log --last 15
-
-
git-merge-
--trim,-T: Delete the previous branch after a successful merge (where applicable).git merge --no-ff --trim -
-
-
git-reflogshow:-
--all: Get all commits (equivalent to--max-count=<TOTAL>).git reflog show --all -
--last: Get lastncommits (equivalent to--max-count=<NUMBER>).git reflog show --last 15
-
-
git-status-
--numbered,-N: Get a list of unstaged and untracked files in the worktree. Intended to be used withgit-add.git status --numbered # -> 1. M apply.c 2. M merge.c 3. ?? rebase.c
-