git: Add git pushall alias
`git pushall` (aliased to gpa) will push the current branch to each connected remote of the repository. So, if you have gitlab, github and keybase connected as remotes, it will push to each one in return. As with the normal push command, you can specify which branch to push ('master', 'develop', ..) after the command, or use `--all` to push all branches at once.
This commit is contained in:
parent
b83929bcbd
commit
df12199fdb
2 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,8 @@
|
||||||
ignore = "!gitignore -f"
|
ignore = "!gitignore -f"
|
||||||
pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html#merge-when-pipeline-succeeds-alias
|
pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html#merge-when-pipeline-succeeds-alias
|
||||||
last = "diff HEAD~ HEAD"
|
last = "diff HEAD~ HEAD"
|
||||||
|
# push to all connected remotes
|
||||||
|
pushall = "!git remote | xargs -L1 -I R git push R"
|
||||||
[commit]
|
[commit]
|
||||||
# sign commits as me
|
# sign commits as me
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
|
|
@ -45,6 +45,7 @@ alias gpn='git push --dry-run'
|
||||||
alias gp='git push'
|
alias gp='git push'
|
||||||
alias gpf!='git push --force'
|
alias gpf!='git push --force'
|
||||||
alias gpm='git pushmerge'
|
alias gpm='git pushmerge'
|
||||||
|
alias gpa='git pushall'
|
||||||
|
|
||||||
alias grv='git remote -v'
|
alias grv='git remote -v'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue