Provides functions to common Z-shell git plugin aliases.
Usage
glog(n = 10)
gcc(...)
gcmsg(msg = "wip")
gco(branch = NULL)
gcb(branch = NULL)
gpr()
gp(...)
gpu()
gpd()
gst()
gss()
gba()
gbd(branch = NULL, force = FALSE)
gbmm(branch = git_default_br())
gbnm(branch = git_default_br())
gbm(branch = NULL)
ga(...)
gaa()
gau()
gsta()
gstl()
gstaa(n = 0)
gstd(n = 0)
gstc()
gsts(text = FALSE)
gpop()
gstp()
gtn()
gfa()
gac()
gwip()
gclean(dry.run = TRUE)
gdf(file = NULL, staged = FALSE)
gpf()
gnuke()
gcf(global = FALSE)
gcm()
grm(...)
grbc()
grba()
grbs()
grbm()
grv()
Arguments
- n
Numeric. How far back to go from current
HEAD
. Same as the command linegit log -n
parameter. Forgit stash
commands, zero-index into the stash list.- ...
Additional arguments passed to the system command-line
git <command> [<args>]
call.- msg
Character. The message for the commit subject line.
- branch
Character. The name of a branch, typically a feature branch.
- force
Logical. Should the branch delete be forced with the
-D
flag?- text
Logical. Show the text diffs from the stash.
- dry.run
Logical. Clean as dry-run?
- file
A full file path within the repository to diff.
- staged
Logical. Compare a staged file to HEAD? Otherwise the working directory is compared to the index (staged or HEAD).
- global
Logical. Query global repository. Alternatively local configuration only.
Functions
glog()
: Get thegit
log in a pretty format for then
most recent commits.gcc()
:git commit ...
. To avoid masking thebase::gc()
function, this alias has been re-mapped togcc()
.gcmsg()
:git commit -m <msg>
.gco()
:git checkout
.gcb()
:git checkout -b <branch>
.gpr()
:git pull --rebase
.gp()
:git push
.gpu()
:git push -u origin
.gpd()
:git push --dry-run
.gst()
:git status
.gss()
:git status -s
.gba()
:git branch -a
.gbd()
:git branch -dD
.gbmm()
:git branch --merged <branch>
.gbnm()
:git branch --no-merged <branch>
.gbm()
:git branch -m
.ga()
:git add ...
.gaa()
:git add --all
.gau()
:git add -u
.gsta()
:git stash
.gstl()
:git stash list
.gstaa()
:git stash apply
. Note: zero-indexing!gstd()
:git stash drop
. Note: zero-indexing!gstc()
:git stash clear
. Danger!gsts()
:git stash show
.gpop()
:git stash pop --quiet --index
.gstp()
: Seegpop()
.gtn()
:git tag -n
.gfa()
:git fetch --all --prune
.gac()
:git commit --no-verify --amend --no-edit
.gwip()
:git commit --no-verify -m 'wip'
.gclean()
:git clean -f -d
.gdf()
:git diff <file>
.gpf()
:git push --force-with-lease
.gnuke()
:git reset --hard && git clean -df
.gcf()
:git config --local
orgit config --global
.gcm()
: Checkout the default branch.grm()
:git rm ...
.grbc()
:git rebase --continue
.grba()
:git rebase --abort
.grbs()
:git rebase --skip
.grbm()
:git rebase git_default_br()
.grv()
:git remote -v
.