- correctif fonctions git

This commit is contained in:
Frogg 2026-05-11 20:22:28 +02:00
parent 3c91da3920
commit 87a54de475
1 changed files with 3 additions and 3 deletions

View File

@ -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}"