Merge 370543282b
into 6465970530
This commit is contained in:
commit
0edac5c84f
|
@ -43,8 +43,8 @@ Aliases
|
|||
commits.
|
||||
- `gcR` removes the *HEAD* commit.
|
||||
- `gcs` shows one or more objects (blobs, trees, tags and commits).
|
||||
- `gcl` lists lost commits.
|
||||
- `gcS` commits with GPG signature.
|
||||
- `gcv` verifies the GPG signature of commits.
|
||||
|
||||
### Conflict
|
||||
|
||||
|
@ -100,11 +100,11 @@ Aliases
|
|||
- `gls` displays the stats log.
|
||||
- `gld` displays the diff log.
|
||||
- `glo` displays the one line log.
|
||||
- `glO` displays the one line log with authors and dates.
|
||||
- `glg` displays the graph log.
|
||||
- `glG` displays the graph log with authors and dates.
|
||||
- `glb` displays the brief commit log.
|
||||
- `glv` displays the log verifying the GPG signature of commits.
|
||||
- `glc` displays the commit count for each contributor in descending order.
|
||||
- `glS` displays the log verifying the GPG signature of commits.
|
||||
|
||||
### Merge
|
||||
|
||||
|
@ -152,7 +152,6 @@ Aliases
|
|||
- `gsx` drops a stashed state.
|
||||
- `gsX` drops all the stashed states.
|
||||
- `gsl` lists stashed states.
|
||||
- `gsL` lists dropped stashed states.
|
||||
- `gsd` displays changes between the stash and its original parent.
|
||||
- `gsp` removes and applies a single stashed state from the stash list.
|
||||
- `gsr` recovers a given stashed state.
|
||||
|
@ -219,12 +218,10 @@ Functions
|
|||
---------
|
||||
|
||||
- `git-branch-current` displays the current branch.
|
||||
- `git-commit-lost` lists lost commits.
|
||||
- `git-dir` displays the path to the Git directory.
|
||||
- `git-ignore-add` adds any arguments to the .gitignore in the project root.
|
||||
- `git-root` displays the path to the working tree root.
|
||||
- `git-stash-clear-interactive` asks for confirmation before clearing the stash.
|
||||
- `git-stash-dropped` lists dropped stashed states.
|
||||
- `git-stash-recover` recovers given dropped stashed states.
|
||||
- `git-submodule-move` moves a submodule.
|
||||
- `git-submodule-remove` removes a submodule.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
git_current_branch
|
|
@ -0,0 +1,2 @@
|
|||
# vim:et sts=2 sw=2 ft=zsh
|
||||
command git symbolic-ref -q --short HEAD
|
|
@ -1,13 +0,0 @@
|
|||
if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
print "${0}: not a repository work tree: ${PWD}" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
command git fsck 2> /dev/null \
|
||||
| grep "^dangling commit" \
|
||||
| awk '{print $3}' \
|
||||
| command git log \
|
||||
--date-order \
|
||||
--no-walk \
|
||||
--stdin \
|
||||
--pretty=format:${_git_log_oneline_format}
|
|
@ -1,15 +0,0 @@
|
|||
if ! command git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
print "${0}: not a repository work tree: ${PWD}" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
command git fsck --unreachable 2> /dev/null \
|
||||
| grep 'commit' \
|
||||
| awk '{print $3}' \
|
||||
| command git log \
|
||||
--pretty=format:${_git_log_oneline_format} \
|
||||
--extended-regexp \
|
||||
--grep="${1:-(WIP )?[Oo]n [^:]+:}" \
|
||||
--merges \
|
||||
--no-walk \
|
||||
--stdin
|
|
@ -1,10 +0,0 @@
|
|||
# vim:et sts=2 sw=2 ft=zsh
|
||||
# slightly modified git_current_branch from oh-my-zsh for theme compatibility
|
||||
local ref
|
||||
ref=$(command git symbolic-ref -q --short HEAD 2>/dev/null)
|
||||
local -i ret=${?}
|
||||
if (( ret )); then
|
||||
(( ret == 128 )) && return # no git repo.
|
||||
ref=$(command git rev-parse --short HEAD 2>/dev/null) || return
|
||||
fi
|
||||
print ${ref}
|
|
@ -10,8 +10,7 @@
|
|||
# See https://git-scm.com/docs/pretty-formats
|
||||
_git_log_medium_format='%C(bold)Commit:%C(reset) %C(yellow)%H%C(auto)%d%n%C(bold)Author:%C(reset) %C(bold blue)%an <%ae>%n%C(bold)Date:%C(reset) %C(cyan)%ai (%ar)%C(reset)%n%+B'
|
||||
_git_log_oneline_format='%C(yellow)%h%C(reset) %s%C(auto)%d%C(reset)'
|
||||
_git_log_fullgraph_format='%C(yellow)%h%C(reset) %<|(60,trunc)%s %C(bold blue)<%an> %C(reset)%C(cyan)(%ar)%C(auto)%d%C(reset)%n'
|
||||
_git_log_brief_format='%C(yellow)%h%C(reset) %s%n%C(bold blue)(%ar by %an)%C(auto)%d%C(reset)%n'
|
||||
_git_log_oneline_medium_format='%C(yellow)%h%C(reset) %<|(60,trunc)%s %C(bold blue)<%an> %C(reset)%C(cyan)(%ar)%C(auto)%d%C(reset)'
|
||||
|
||||
#
|
||||
# Aliases
|
||||
|
@ -45,9 +44,8 @@ alias gcP='git cherry-pick --no-commit'
|
|||
alias gcr='git revert'
|
||||
alias gcR='git reset "HEAD^"'
|
||||
alias gcs='git show --pretty=format:"${_git_log_medium_format}"'
|
||||
alias gcl='git-commit-lost'
|
||||
alias gcS='git commit -S'
|
||||
alias gpS='git show --pretty=short --show-signature'
|
||||
alias gcv='git verify-commit'
|
||||
|
||||
# Conflict (C)
|
||||
alias gCl='git --no-pager diff --diff-filter=U --name-only'
|
||||
|
@ -98,11 +96,11 @@ alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
|
|||
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
|
||||
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
|
||||
alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"'
|
||||
alias glO='git log --topo-order --pretty=format:"${_git_log_oneline_medium_format}"'
|
||||
alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}%n"'
|
||||
alias glG='git log --topo-order --all --graph --pretty=format:"${_git_log_fullgraph_format}"'
|
||||
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
|
||||
alias glG='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_medium_format}%n"'
|
||||
alias glv='git log --topo-order --show-signature --pretty=format:"${_git_log_medium_format}"'
|
||||
alias glc='git shortlog --summary --numbered'
|
||||
alias glS='git log --topo-order --show-signature --pretty=format:"${_git_log_medium_format}"'
|
||||
|
||||
# Merge (m)
|
||||
alias gm='git merge'
|
||||
|
@ -143,7 +141,6 @@ alias gsa='git stash apply'
|
|||
alias gsx='git stash drop'
|
||||
alias gsX='git-stash-clear-interactive'
|
||||
alias gsl='git stash list'
|
||||
alias gsL='git-stash-dropped'
|
||||
alias gsd='git stash show --patch --stat'
|
||||
alias gsp='git stash pop'
|
||||
alias gsr='git-stash-recover'
|
||||
|
|
Loading…
Reference in New Issue