- fix git init

This commit is contained in:
Frogg 2026-05-15 19:49:55 +02:00
parent fca4d296bb
commit a75d4db48e
1 changed files with 14 additions and 1 deletions

View File

@ -35,6 +35,19 @@ gitinit(){
git config --global --replace-all user.name "${git_user}"
git config --global --replace-all user.email "${git_email}"
echo "
# Ignorer les phpstorm
.idea
# Ignorer les backups et fichiers temporaires
*~
*.bak
*.swp
*.save" > .gitignore
echo "" > LICENSE
echo "" > CHANGELOG.md
echo "" > README.md
msg_info "Init git repository"
git init
git add .
@ -63,7 +76,7 @@ gitinit(){
fi
# Push repo on git server
if ! git push -u origin main; then
if ! git push -u origin main --force; then
msg_error "Error while pushing to ${repo_name}"
return 2
fi