- correctif fonctions git
This commit is contained in:
parent
3c91da3920
commit
87a54de475
|
|
@ -4,7 +4,7 @@ getbranch(){
|
|||
# Récupère le nom de la branche actuelle
|
||||
branch=$(git branch --show-current 2>/dev/null)
|
||||
if [[ -z "$branch" ]]; then
|
||||
echo "Pas dans un dépôt Git"
|
||||
msg_error "Pas dans un dépôt Git"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ getbranch(){
|
|||
|
||||
gitreset(){
|
||||
local branch
|
||||
branch=get-branch
|
||||
branch=getbranch
|
||||
|
||||
git fetch origin
|
||||
git reset --hard origin/"${1:-$branch}"
|
||||
|
|
@ -24,7 +24,7 @@ gitreset(){
|
|||
|
||||
gitsync(){
|
||||
local branch
|
||||
branch=get-branch
|
||||
branch=getbranch
|
||||
|
||||
git fetch
|
||||
git pull origin "${1:-$branch}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue