git : add gdc.
This commit is contained in:
parent
7fe2c859ec
commit
2c46885827
|
@ -516,11 +516,12 @@ Command|Description
|
|||
`gs`|Git status.
|
||||
`gst`|Git stash.
|
||||
`gd`|Git diff.
|
||||
`gc [MESSAGE]`|Git commit.
|
||||
`gdc <HASH>`|Git diff for a specific commit.
|
||||
`gc <MESSAGE>`|Git commit.
|
||||
`gch`|Git checkout.
|
||||
`gchb`|Git checkout branch.
|
||||
`gb`|Git branch.
|
||||
`gbd [BRANCH]`|Delete specified Git branch.
|
||||
`gbd <BRANCH>`|Delete specified Git branch.
|
||||
`gbda`|Delete all local branches except the current one.
|
||||
`gf`|Git fetch --all.
|
||||
`gt`|Git tag.
|
||||
|
@ -529,7 +530,7 @@ Command|Description
|
|||
`gp`|Git patch (apply).
|
||||
`ga`|Git add with preview.
|
||||
`gr [COUNT]`|Git rebase. 2 last commits by default. 0 means from root.
|
||||
`gu [EMAIL]`|Configure git user as Dmitry Voronin with specified email (project).
|
||||
`gu <EMAIL>`|Configure git user as Dmitry Voronin with specified email (project).
|
||||
`gg <REPO>`|Get git repo from my own git.
|
||||
|
||||
## Ls.
|
||||
|
|
|
@ -74,6 +74,13 @@ gg()
|
|||
git clone https://git.voronind.com/voronind/"${1}"
|
||||
}
|
||||
|
||||
# See diff for a specific commit.
|
||||
# Usage: gdc <COMMITHASH>
|
||||
gdc()
|
||||
{
|
||||
git diff "${1}^!"
|
||||
}
|
||||
|
||||
# Show current branch.
|
||||
_git_current_branch()
|
||||
{
|
||||
|
@ -89,6 +96,7 @@ __git_complete gl _git_log &> /dev/null
|
|||
__git_complete gs _git_status &> /dev/null
|
||||
__git_complete gst _git_stash &> /dev/null
|
||||
__git_complete gd _git_diff &> /dev/null
|
||||
__git_complete gdc _git_diff &> /dev/null
|
||||
__git_complete gc _git_commit &> /dev/null
|
||||
__git_complete gch _git_checkout &> /dev/null
|
||||
__git_complete gchb _git_checkout &> /dev/null
|
||||
|
|
Reference in a new issue