Reload gpg-agent before some git commands
This commit is contained in:
parent
d3a5ff8349
commit
0de6b9edf1
22
zshrc
22
zshrc
|
@ -179,8 +179,6 @@ alias pbin='~/repos/cpaste/cpaste --sourcecode --expire 1week --file '
|
|||
## Git aliases − Try to prefix with 'gg' {{{
|
||||
### Get status of the repo
|
||||
alias ggstatus='git status'
|
||||
### Download any new commits
|
||||
alias ggpull='git pull'
|
||||
### Show differences between changes and index
|
||||
alias ggdiff='git diff'
|
||||
### Show only words/characters differences
|
||||
|
@ -193,13 +191,6 @@ alias ggrm='git rm'
|
|||
alias ggmv='git mv'
|
||||
### Cancel changes
|
||||
alias ggcheckout='git checkout --'
|
||||
### Commit changes
|
||||
alias ggco='git commit'
|
||||
alias ggcommit='git commit'
|
||||
### Amend changes
|
||||
alias ggamend='git commit --amend'
|
||||
### Update remote repository
|
||||
alias ggpush='git push'
|
||||
### Print lines matching a pattern
|
||||
alias ggrep='git grep --color -n -P'
|
||||
alias gggrep='git grep --color -n -P'
|
||||
|
@ -211,6 +202,17 @@ alias gglg="git --no-pager log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto
|
|||
alias ggllg="git log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset'"
|
||||
### Display all commits/changes of a file
|
||||
alias ggchanges="git log --follow -p --"
|
||||
|
||||
### Commands that might require a valid gpg-agent
|
||||
#### Download any new commits
|
||||
alias ggpull='load-gpg-agent && git pull'
|
||||
#### Commit changes
|
||||
alias ggco='load-gpg-agent && git commit'
|
||||
alias ggcommit='load-gpg-agent && git commit'
|
||||
#### Amend changes
|
||||
alias ggamend='load-gpg-agent && git commit --amend'
|
||||
#### Update remote repository
|
||||
alias ggpush='load-gpg-agent && git push'
|
||||
## }}}
|
||||
|
||||
# Lister les fichiers de configuration inutiles
|
||||
|
@ -376,7 +378,7 @@ alias scpdev='scp -o UserKnownHostsFile=/dev/null'
|
|||
# GPG {{{
|
||||
#########
|
||||
|
||||
# Load gpg-agent {{{
|
||||
# (re)Load gpg-agent {{{
|
||||
## This function can be used :
|
||||
## 1. with aliases (git commit,…)
|
||||
function load-gpg-agent() {
|
||||
|
|
Loading…
Reference in New Issue