[git] add aliases: stash unapply and full graph

Added git aliases:
- "gsu": Stash unapply to revert applied changes
- "glG": Full graph (like glg but with author and date)

Closes #53
This commit is contained in:
Igor Zibarev 2016-05-05 16:56:08 +06:00 committed by Adam Goldsmith
parent 7f49a24e2f
commit 616579e02f
2 changed files with 5 additions and 0 deletions

View File

@ -103,6 +103,7 @@ Aliases
- `gld` displays the diff log.
- `glo` displays the one line log.
- `glg` displays the graph log.
- `glG` displays the graph log with authors and dates.
- `glb` displays the brief commit log.
- `glc` displays the commit count for each contributor in descending order.
@ -160,6 +161,7 @@ Aliases
- `gss` stashes the changes of the dirty working directory, including untracked.
- `gsS` stashes the changes of the dirty working directory interactively.
- `gsw` stashes the changes of the dirty working directory retaining the index.
- `gsu` unapplies (reverts) applied changes.
### Submodule

View File

@ -9,6 +9,7 @@
# Log
_git_log_medium_format='%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
_git_log_oneline_format='%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n'
_git_log_fullgraph_format='%C(green)%h%C(reset) %<|(50,trunc)%s %C(bold blue)<%an>%C(reset) %C(yellow)(%cd)%C(reset)%C(auto)%d%C(reset)%n'
_git_log_brief_format='%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n'
#
@ -97,6 +98,7 @@ 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 glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
alias glG='git log --topo-order --all --graph --pretty=format:"${_git_log_fullgraph_format}" --date=relative'
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
alias glc='git shortlog --summary --numbered'
alias glS='git log --show-signature'
@ -148,6 +150,7 @@ alias gsr='git-stash-recover'
alias gss='git stash save --include-untracked'
alias gsS='git stash save --patch --no-keep-index'
alias gsw='git stash save --include-untracked --keep-index'
alias gsu='git stash show -p | git apply -R'
# Submodule (S)
alias gS='git submodule'