2012-07-19 19:01:32 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Description
|
|
|
|
# -----------
|
|
|
|
#
|
2018-08-08 02:42:02 +08:00
|
|
|
# Completion script for git-extras (https://github.com/tj/git-extras).
|
2012-07-19 19:01:32 +08:00
|
|
|
#
|
2015-12-16 13:52:13 +08:00
|
|
|
# This depends on and reuses some of the internals of the _git completion
|
2015-10-02 15:07:01 +08:00
|
|
|
# function that ships with zsh itself. It will not work with the _git that ships
|
|
|
|
# with git.
|
|
|
|
#
|
2012-07-19 19:01:32 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Authors
|
|
|
|
# -------
|
|
|
|
#
|
|
|
|
# * Alexis GRIMALDI (https://github.com/agrimaldi)
|
2014-12-15 12:41:22 +08:00
|
|
|
# * spacewander (https://github.com/spacewander)
|
2012-07-19 19:01:32 +08:00
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Inspirations
|
|
|
|
# -----------
|
|
|
|
#
|
2018-08-08 02:42:02 +08:00
|
|
|
# * git-extras (https://github.com/tj/git-extras)
|
|
|
|
# * git-flow-completion (https://github.com/bobthecow/git-flow-completion)
|
2012-07-19 19:01:32 +08:00
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------------------
|
2012-07-19 18:50:53 +08:00
|
|
|
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
# Internal functions
|
|
|
|
# These are a lot like their __git_* equivalents inside _git
|
2012-07-19 18:50:53 +08:00
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_command_successful () {
|
|
|
|
if (( ${#*:#0} > 0 )); then
|
|
|
|
_message 'not a git repository'
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
}
|
2012-07-19 18:50:53 +08:00
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_commits() {
|
2014-12-15 12:41:22 +08:00
|
|
|
declare -A commits
|
|
|
|
git log --oneline -15 | sed 's/\([[:alnum:]]\{7\}\) /\1:/' | while read commit
|
|
|
|
do
|
|
|
|
hash=$(echo $commit | cut -d':' -f1)
|
|
|
|
commits[$hash]="$commit"
|
|
|
|
done
|
|
|
|
local ret=1
|
|
|
|
_describe -t commits commit commits && ret=0
|
|
|
|
}
|
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
__gitex_remote_names() {
|
|
|
|
local expl
|
|
|
|
declare -a remote_names
|
|
|
|
remote_names=(${(f)"$(_call_program remotes git remote 2>/dev/null)"})
|
|
|
|
__git_command_successful || return
|
|
|
|
_wanted remote-names expl remote-name compadd $* - $remote_names
|
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_tag_names() {
|
2012-07-19 18:50:53 +08:00
|
|
|
local expl
|
|
|
|
declare -a tag_names
|
2014-12-15 12:41:22 +08:00
|
|
|
tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/})
|
2012-07-19 18:50:53 +08:00
|
|
|
__git_command_successful || return
|
|
|
|
_wanted tag-names expl tag-name compadd $* - $tag_names
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_branch_names() {
|
2012-07-19 18:50:53 +08:00
|
|
|
local expl
|
|
|
|
declare -a branch_names
|
|
|
|
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
|
|
|
|
__git_command_successful || return
|
|
|
|
_wanted branch-names expl branch-name compadd $* - $branch_names
|
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_specific_branch_names() {
|
2012-07-19 18:50:53 +08:00
|
|
|
local expl
|
|
|
|
declare -a branch_names
|
2014-12-15 12:41:22 +08:00
|
|
|
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/})
|
2012-07-19 18:50:53 +08:00
|
|
|
__git_command_successful || return
|
2018-08-20 03:36:21 +08:00
|
|
|
_wanted branch-names expl branch-name compadd - $branch_names
|
|
|
|
}
|
|
|
|
|
|
|
|
__gitex_chore_branch_names() {
|
|
|
|
__gitex_specific_branch_names 'chore'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_feature_branch_names() {
|
|
|
|
__gitex_specific_branch_names 'feature'
|
2014-12-15 12:41:22 +08:00
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_refactor_branch_names() {
|
|
|
|
__gitex_specific_branch_names 'refactor'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_bug_branch_names() {
|
|
|
|
__gitex_specific_branch_names 'bug'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_submodule_names() {
|
2012-07-19 18:50:53 +08:00
|
|
|
local expl
|
|
|
|
declare -a submodule_names
|
2015-10-02 15:07:01 +08:00
|
|
|
submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"}) # '
|
2012-07-19 18:50:53 +08:00
|
|
|
__git_command_successful || return
|
|
|
|
_wanted submodule-names expl submodule-name compadd $* - $submodule_names
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
__gitex_author_names() {
|
2012-07-19 18:50:53 +08:00
|
|
|
local expl
|
|
|
|
declare -a author_names
|
|
|
|
author_names=(${(f)"$(_call_program branchrefs git log --format='%aN' | sort -u)"})
|
|
|
|
__git_command_successful || return
|
|
|
|
_wanted author-names expl author-name compadd $* - $author_names
|
|
|
|
}
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
# subcommands
|
2018-08-20 03:36:21 +08:00
|
|
|
_git-authors() {
|
|
|
|
_arguments -C \
|
|
|
|
'(--list -l)'{--list,-l}'[show authors]' \
|
|
|
|
'--no-email[without email]' \
|
|
|
|
}
|
2012-07-19 18:50:53 +08:00
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-bug() {
|
|
|
|
local curcontext=$curcontext state line ret=1
|
|
|
|
declare -A opt_args
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
': :->command' \
|
|
|
|
'*:: :->option-or-argument' && ret=0
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
(command)
|
|
|
|
declare -a commands
|
|
|
|
commands=(
|
|
|
|
'finish:merge bug into the current branch'
|
|
|
|
)
|
|
|
|
_describe -t commands command commands && ret=0
|
|
|
|
;;
|
|
|
|
(option-or-argument)
|
|
|
|
curcontext=${curcontext%:*}-$line[1]:
|
|
|
|
case $line[1] in
|
|
|
|
(finish)
|
|
|
|
_arguments -C \
|
2015-10-02 15:07:01 +08:00
|
|
|
':branch-name:__gitex_bug_branch_names'
|
2014-12-15 12:41:22 +08:00
|
|
|
;;
|
2018-08-20 03:36:21 +08:00
|
|
|
-r|--remote )
|
|
|
|
_arguments -C \
|
|
|
|
':remote-name:__gitex_remote_names'
|
|
|
|
;;
|
2014-12-15 12:41:22 +08:00
|
|
|
esac
|
2018-08-20 03:36:21 +08:00
|
|
|
return 0
|
2014-12-15 12:41:22 +08:00
|
|
|
esac
|
2018-08-20 03:36:21 +08:00
|
|
|
|
|
|
|
_arguments \
|
|
|
|
'(--remote -r)'{--remote,-r}'[setup remote tracking branch]'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-changelog() {
|
2012-07-19 18:50:53 +08:00
|
|
|
_arguments \
|
2014-12-15 12:41:22 +08:00
|
|
|
'(-l --list)'{-l,--list}'[list commits]' \
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
_git-chore() {
|
|
|
|
local curcontext=$curcontext state line ret=1
|
|
|
|
declare -A opt_args
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
': :->command' \
|
|
|
|
'*:: :->option-or-argument' && ret=0
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
(command)
|
|
|
|
declare -a commands
|
|
|
|
commands=(
|
|
|
|
'finish:merge and delete the chore branch'
|
|
|
|
)
|
|
|
|
_describe -t commands command commands && ret=0
|
|
|
|
;;
|
|
|
|
(option-or-argument)
|
|
|
|
curcontext=${curcontext%:*}-$line[1]:
|
|
|
|
case $line[1] in
|
|
|
|
(finish)
|
|
|
|
_arguments -C \
|
|
|
|
':branch-name:__gitex_chore_branch_names'
|
|
|
|
;;
|
|
|
|
-r|--remote )
|
|
|
|
_arguments -C \
|
|
|
|
':remote-name:__gitex_remote_names'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
return 0
|
|
|
|
esac
|
|
|
|
|
|
|
|
_arguments \
|
|
|
|
'(--remote -r)'{--remote,-r}'[setup remote tracking branch]'
|
|
|
|
}
|
2012-07-19 18:50:53 +08:00
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
|
2012-07-19 18:50:53 +08:00
|
|
|
_git-contrib() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':author:__gitex_author_names'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_git-count() {
|
|
|
|
_arguments \
|
|
|
|
'--all[detailed commit count]'
|
|
|
|
}
|
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
_git-create-branch() {
|
|
|
|
local curcontext=$curcontext state line
|
|
|
|
_arguments -C \
|
|
|
|
': :->command' \
|
|
|
|
'*:: :->option-or-argument'
|
|
|
|
|
|
|
|
case "$state" in
|
|
|
|
(command)
|
|
|
|
_arguments \
|
|
|
|
'(--remote -r)'{--remote,-r}'[setup remote tracking branch]'
|
|
|
|
;;
|
|
|
|
(option-or-argument)
|
|
|
|
curcontext=${curcontext%:*}-$line[1]:
|
|
|
|
case $line[1] in
|
|
|
|
-r|--remote )
|
|
|
|
_arguments -C \
|
|
|
|
':remote-name:__gitex_remote_names'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
}
|
2012-07-19 18:50:53 +08:00
|
|
|
|
|
|
|
_git-delete-branch() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':branch-name:__gitex_branch_names'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_git-delete-submodule() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':submodule-name:__gitex_submodule_names'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_git-delete-tag() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':tag-name:__gitex_tag_names'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-effort() {
|
|
|
|
_arguments \
|
|
|
|
'--above[ignore file with less than x commits]'
|
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
|
2012-07-19 18:50:53 +08:00
|
|
|
_git-extras() {
|
|
|
|
local curcontext=$curcontext state line ret=1
|
|
|
|
declare -A opt_args
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
': :->command' \
|
|
|
|
'*:: :->option-or-argument' && ret=0
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
(command)
|
|
|
|
declare -a commands
|
|
|
|
commands=(
|
|
|
|
'update:update git-extras'
|
|
|
|
)
|
|
|
|
_describe -t commands command commands && ret=0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
_arguments \
|
2014-12-15 12:41:22 +08:00
|
|
|
'(-v --version)'{-v,--version}'[show current version]'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_git-feature() {
|
|
|
|
local curcontext=$curcontext state line ret=1
|
|
|
|
declare -A opt_args
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
': :->command' \
|
|
|
|
'*:: :->option-or-argument' && ret=0
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
(command)
|
|
|
|
declare -a commands
|
|
|
|
commands=(
|
|
|
|
'finish:merge feature into the current branch'
|
|
|
|
)
|
|
|
|
_describe -t commands command commands && ret=0
|
|
|
|
;;
|
|
|
|
(option-or-argument)
|
|
|
|
curcontext=${curcontext%:*}-$line[1]:
|
|
|
|
case $line[1] in
|
|
|
|
(finish)
|
|
|
|
_arguments -C \
|
2015-10-02 15:07:01 +08:00
|
|
|
':branch-name:__gitex_feature_branch_names'
|
2012-07-19 18:50:53 +08:00
|
|
|
;;
|
2018-08-20 03:36:21 +08:00
|
|
|
-r|--remote )
|
|
|
|
_arguments -C \
|
|
|
|
':remote-name:__gitex_remote_names'
|
|
|
|
;;
|
2012-07-19 18:50:53 +08:00
|
|
|
esac
|
2018-08-20 03:36:21 +08:00
|
|
|
return 0
|
2012-07-19 18:50:53 +08:00
|
|
|
esac
|
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
_arguments \
|
|
|
|
'(--remote -r)'{--remote,-r}'[setup remote tracking branch]'
|
|
|
|
}
|
2012-07-19 18:50:53 +08:00
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-graft() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':src-branch-name:__gitex_branch_names' \
|
|
|
|
':dest-branch-name:__gitex_branch_names'
|
2014-12-15 12:41:22 +08:00
|
|
|
}
|
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
_git-guilt() {
|
|
|
|
_arguments -C \
|
|
|
|
'(--email -e)'{--email,-e}'[display author emails instead of names]' \
|
|
|
|
'(--ignore-whitespace -w)'{--ignore-whitespace,-w}'[ignore whitespace only changes]' \
|
|
|
|
'(--debug -d)'{--debug,-d}'[output debug information]' \
|
|
|
|
'-h[output usage information]'
|
|
|
|
}
|
2014-12-15 12:41:22 +08:00
|
|
|
|
|
|
|
_git-ignore() {
|
|
|
|
_arguments -C \
|
|
|
|
'(--local -l)'{--local,-l}'[show local gitignore]' \
|
2018-08-20 03:36:21 +08:00
|
|
|
'(--global -g)'{--global,-g}'[show global gitignore]' \
|
|
|
|
'(--private -p)'{--private,-p}'[show repo gitignore]'
|
2014-12-15 12:41:22 +08:00
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
_git-ignore() {
|
|
|
|
_arguments -C \
|
|
|
|
'(--append -a)'{--append,-a}'[append .gitignore]' \
|
|
|
|
'(--replace -r)'{--replace,-r}'[replace .gitignore]' \
|
|
|
|
'(--list-in-table -l)'{--list-in-table,-l}'[print available types in table format]' \
|
|
|
|
'(--list-alphabetically -L)'{--list-alphabetically,-L}'[print available types in alphabetical order]' \
|
|
|
|
'(--search -s)'{--search,-s}'[search word in available types]'
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_git-merge-into() {
|
|
|
|
_arguments '--ff-only[merge only fast-forward]'
|
|
|
|
_arguments \
|
|
|
|
':src:__gitex_branch_names' \
|
|
|
|
':dest:__gitex_branch_names'
|
|
|
|
}
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-missing() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':first-branch-name:__gitex_branch_names' \
|
|
|
|
':second-branch-name:__gitex_branch_names'
|
2014-12-15 12:41:22 +08:00
|
|
|
}
|
|
|
|
|
2015-10-02 15:07:01 +08:00
|
|
|
|
2012-07-19 18:50:53 +08:00
|
|
|
_git-refactor() {
|
|
|
|
local curcontext=$curcontext state line ret=1
|
|
|
|
declare -A opt_args
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
': :->command' \
|
|
|
|
'*:: :->option-or-argument' && ret=0
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
(command)
|
|
|
|
declare -a commands
|
|
|
|
commands=(
|
|
|
|
'finish:merge refactor into the current branch'
|
|
|
|
)
|
|
|
|
_describe -t commands command commands && ret=0
|
|
|
|
;;
|
|
|
|
(option-or-argument)
|
|
|
|
curcontext=${curcontext%:*}-$line[1]:
|
|
|
|
case $line[1] in
|
|
|
|
(finish)
|
|
|
|
_arguments -C \
|
2015-10-02 15:07:01 +08:00
|
|
|
':branch-name:__gitex_refactor_branch_names'
|
2012-07-19 18:50:53 +08:00
|
|
|
;;
|
2018-08-20 03:36:21 +08:00
|
|
|
-r|--remote )
|
|
|
|
_arguments -C \
|
|
|
|
':remote-name:__gitex_remote_names'
|
|
|
|
;;
|
2012-07-19 18:50:53 +08:00
|
|
|
esac
|
2018-08-20 03:36:21 +08:00
|
|
|
return 0
|
2012-07-19 18:50:53 +08:00
|
|
|
esac
|
2018-08-20 03:36:21 +08:00
|
|
|
|
|
|
|
_arguments \
|
|
|
|
'(--remote -r)'{--remote,-r}'[setup remote tracking branch]'
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-squash() {
|
|
|
|
_arguments \
|
2015-10-02 15:07:01 +08:00
|
|
|
':branch-name:__gitex_branch_names'
|
2014-12-15 12:41:22 +08:00
|
|
|
}
|
2012-07-19 18:50:53 +08:00
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
_git-stamp() {
|
|
|
|
_arguments -C \
|
|
|
|
'(--replace -r)'{--replace,-r}'[replace stamps with same id]'
|
|
|
|
}
|
|
|
|
|
|
|
|
_git-standup() {
|
|
|
|
_arguments -C \
|
|
|
|
'-a[Specify the author of commits. Use "all" to specify all authors.]' \
|
|
|
|
'-d[Show history since N days ago]' \
|
|
|
|
'-D[Specify the date format displayed in commit history]' \
|
|
|
|
'-f[Fetch commits before showing history]' \
|
|
|
|
'-g[Display GPG signed info]' \
|
|
|
|
'-h[Display help message]' \
|
|
|
|
'-L[Enable the inclusion of symbolic links]' \
|
|
|
|
'-m[The depth of recursive directory search]'
|
|
|
|
}
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-summary() {
|
2015-10-02 15:07:01 +08:00
|
|
|
_arguments '--line[summarize with lines rather than commits]'
|
|
|
|
__gitex_commits
|
2012-07-19 18:50:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-15 12:41:22 +08:00
|
|
|
_git-undo(){
|
|
|
|
_arguments -C \
|
|
|
|
'(--soft -s)'{--soft,-s}'[only rolls back the commit but changes remain un-staged]' \
|
|
|
|
'(--hard -h)'{--hard,-h}'[wipes your commit(s)]'
|
|
|
|
}
|
|
|
|
|
2018-08-20 03:36:21 +08:00
|
|
|
zstyle -g existing_user_commands ':completion:*:*:git:*' user-commands
|
|
|
|
|
|
|
|
zstyle ':completion:*:*:git:*' user-commands $existing_user_commands \
|
2014-12-15 12:41:22 +08:00
|
|
|
alias:'define, search and show aliases' \
|
2018-08-20 03:36:21 +08:00
|
|
|
archive-file:'export the current head of the git repository to an archive' \
|
|
|
|
authors:'generate authors report' \
|
2014-12-15 12:41:22 +08:00
|
|
|
back:'undo and stage latest commits' \
|
2018-08-20 03:36:21 +08:00
|
|
|
bug:'create bug branch' \
|
|
|
|
bulk:'run bulk commands' \
|
|
|
|
changelog:'generate a changelog report' \
|
|
|
|
chore:'create chore branch' \
|
|
|
|
clear-soft:'soft clean up a repository' \
|
|
|
|
clear:'rigorously clean up a repository' \
|
|
|
|
commits-since:'show commit logs since some date' \
|
|
|
|
contrib:'show user contributions' \
|
|
|
|
count:'show commit count' \
|
|
|
|
create-branch:'create branches' \
|
|
|
|
delete-branch:'delete branches' \
|
|
|
|
delete-merged-branches:'delete merged branches' \
|
|
|
|
delete-submodule:'delete submodules' \
|
|
|
|
delete-tag:'delete tags' \
|
|
|
|
delta:'lists changed files' \
|
|
|
|
effort:'show effort statistics on file(s)' \
|
|
|
|
extras:'awesome git utilities' \
|
|
|
|
feature:'create/merge feature branch' \
|
|
|
|
force-clone:'overwrite local repositories with clone' \
|
2019-05-08 02:02:41 +08:00
|
|
|
fork:'fork a repo on GitHub' \
|
2018-08-20 03:36:21 +08:00
|
|
|
fresh-branch:'create fresh branches' \
|
2019-05-08 02:02:41 +08:00
|
|
|
gh-pages:'create the GitHub pages branch' \
|
2018-08-20 03:36:21 +08:00
|
|
|
graft:'merge and destroy a given branch' \
|
|
|
|
guilt:'calculate change between two revisions' \
|
|
|
|
ignore-io:'get sample gitignore file' \
|
|
|
|
ignore:'add .gitignore patterns' \
|
|
|
|
info:'returns information on current repository' \
|
|
|
|
local-commits:'list local commits' \
|
2014-12-15 12:41:22 +08:00
|
|
|
lock:'lock a file excluded from version control' \
|
|
|
|
locked:'ls files that have been locked' \
|
2018-08-20 03:36:21 +08:00
|
|
|
merge-into:'merge one branch into another' \
|
|
|
|
merge-repo:'merge two repo histories' \
|
2014-12-15 12:41:22 +08:00
|
|
|
missing:'show commits missing from another branch' \
|
2018-08-20 03:36:21 +08:00
|
|
|
mr:'checks out a merge request locally' \
|
|
|
|
obliterate:'rewrite past commits to remove some files' \
|
2014-12-15 12:41:22 +08:00
|
|
|
pr:'checks out a pull request locally' \
|
2018-08-20 03:36:21 +08:00
|
|
|
psykorebase:'rebase a branch with a merge commit' \
|
|
|
|
pull-request:'create pull request to GitHub project' \
|
|
|
|
reauthor:'replace the author and/or committer identities in commits and tags' \
|
2014-12-15 12:41:22 +08:00
|
|
|
rebase-patch:'rebases a patch' \
|
2018-08-20 03:36:21 +08:00
|
|
|
refactor:'create refactor branch' \
|
2014-12-15 12:41:22 +08:00
|
|
|
release:'commit, tag and push changes to the repository' \
|
2018-08-20 03:36:21 +08:00
|
|
|
rename-branch:'rename a branch' \
|
2014-12-15 12:41:22 +08:00
|
|
|
rename-tag:'rename a tag' \
|
2018-08-20 03:36:21 +08:00
|
|
|
repl:'git read-eval-print-loop' \
|
2014-12-15 12:41:22 +08:00
|
|
|
reset-file:'reset one file' \
|
|
|
|
root:'show path of root' \
|
2018-08-20 03:36:21 +08:00
|
|
|
scp:'copy files to ssh compatible `git-remote`' \
|
|
|
|
sed:'replace patterns in git-controlled files' \
|
|
|
|
setup:'set up a git repository' \
|
|
|
|
show-merged-branches:'show merged branches' \
|
2014-12-15 12:41:22 +08:00
|
|
|
show-tree:'show branch tree of commit history' \
|
2018-08-20 03:36:21 +08:00
|
|
|
show-unmerged-branches:'show unmerged branches' \
|
|
|
|
squash:'import changes from a branch' \
|
|
|
|
stamp:'stamp the last commit message' \
|
|
|
|
standup:'recall the commit history' \
|
|
|
|
summary:'show repository summary' \
|
|
|
|
sync:'sync local branch with remote branch' \
|
|
|
|
touch:'touch and add file to the index' \
|
|
|
|
undo:'remove latest commits' \
|
2014-12-15 12:41:22 +08:00
|
|
|
unlock:'unlock a file excluded from version control'
|