update base content
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
54
git-commit.bat
Normal file
54
git-commit.bat
Normal file
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
REM Script pour automatiser git add, commit et push
|
||||
REM Usage: git-commit.bat "votre message de commit"
|
||||
|
||||
REM Vérifier si un message de commit a été fourni
|
||||
if "%~1"=="" (
|
||||
echo Erreur: Veuillez fournir un message de commit.
|
||||
echo Usage: git-commit.bat "votre message de commit"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Récupérer le message de commit depuis les arguments
|
||||
set "COMMIT_MESSAGE=%~1"
|
||||
|
||||
echo Execution des commandes git...
|
||||
echo ----------------------------------------
|
||||
|
||||
REM git add .
|
||||
echo 1. Ajout de tous les fichiers ^(git add .^)
|
||||
git add .
|
||||
|
||||
REM Vérifier si git add a réussi
|
||||
if %errorlevel% equ 0 (
|
||||
echo ✓ git add . - Succes
|
||||
) else (
|
||||
echo ✗ git add . - Echec
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM git commit
|
||||
echo 2. Commit avec le message: "%COMMIT_MESSAGE%"
|
||||
git commit -m "%COMMIT_MESSAGE%"
|
||||
|
||||
REM Vérifier si git commit a réussi
|
||||
if %errorlevel% equ 0 (
|
||||
echo ✓ git commit - Succes
|
||||
) else (
|
||||
echo ✗ git commit - Echec
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM git push
|
||||
echo 3. Push vers le repository distant
|
||||
git push
|
||||
|
||||
REM Vérifier si git push a réussi
|
||||
if %errorlevel% equ 0 (
|
||||
echo ✓ git push - Succes
|
||||
echo ----------------------------------------
|
||||
echo Toutes les operations git ont ete effectuees avec succes !
|
||||
) else (
|
||||
echo ✗ git push - Echec
|
||||
exit /b 1
|
||||
)
|
||||
55
git-commit.sh
Normal file
55
git-commit.sh
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script pour automatiser git add, commit et push
|
||||
# Usage: ./git-commit.sh "votre message de commit"
|
||||
|
||||
# Vérifier si un message de commit a été fourni
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Erreur: Veuillez fournir un message de commit."
|
||||
echo "Usage: ./git-commit.sh \"votre message de commit\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Récupérer le message de commit depuis les arguments
|
||||
COMMIT_MESSAGE="$1"
|
||||
|
||||
echo "Exécution des commandes git..."
|
||||
echo "----------------------------------------"
|
||||
|
||||
# git add .
|
||||
echo "1. Ajout de tous les fichiers (git add .)"
|
||||
git add .
|
||||
|
||||
# Vérifier si git add a réussi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ git add . - Succès"
|
||||
else
|
||||
echo "✗ git add . - Échec"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# git commit
|
||||
echo "2. Commit avec le message: \"$COMMIT_MESSAGE\""
|
||||
git commit -m "$COMMIT_MESSAGE"
|
||||
|
||||
# Vérifier si git commit a réussi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ git commit - Succès"
|
||||
else
|
||||
echo "✗ git commit - Échec"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# git push
|
||||
echo "3. Push vers le repository distant"
|
||||
git push
|
||||
|
||||
# Vérifier si git push a réussi
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ git push - Succès"
|
||||
echo "----------------------------------------"
|
||||
echo "Toutes les opérations git ont été effectuées avec succès !"
|
||||
else
|
||||
echo "✗ git push - Échec"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user