secure push
This commit is contained in:
parent
121bc2a2ef
commit
be5b257190
1 changed files with 1 additions and 12 deletions
13
zsh/.zshrc
13
zsh/.zshrc
|
|
@ -150,18 +150,7 @@ gc() {
|
||||||
read msg
|
read msg
|
||||||
git commit -m "$msg"
|
git commit -m "$msg"
|
||||||
}
|
}
|
||||||
gp() {
|
alias gp='git push'
|
||||||
local branch target
|
|
||||||
branch="$(git branch --show-current)" || return 1
|
|
||||||
if [[ -z "$branch" ]]; then
|
|
||||||
print -u2 "Erreur : aucune branche Git active."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# URL de fetch : une destination unique, même si origin déclare plusieurs pushurl.
|
|
||||||
target="$(git remote get-url origin)" || return 1
|
|
||||||
print -r -- "Push vers une seule destination : $target ($branch)"
|
|
||||||
git push "$target" "$branch"
|
|
||||||
}
|
|
||||||
alias gl='git log --oneline --graph --decorate'
|
alias gl='git log --oneline --graph --decorate'
|
||||||
gpall() {
|
gpall() {
|
||||||
local branch answer
|
local branch answer
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue