- fix git init

This commit is contained in:
Frogg 2026-05-15 15:31:27 +02:00
parent 5895846530
commit f0433b34c7
2 changed files with 6 additions and 2 deletions

View File

@ -2,4 +2,6 @@
# shellcheck disable=SC2034 # shellcheck disable=SC2034
CONFIG_SERVER_GIT="https://gitea.server.home/" CONFIG_GIT_SERVER="https://gitea.server.home/"
CONFIG_GIT_USER="Frogg"
CONFIG_GIT_EMAIL="admin@frogg.fr"

View File

@ -23,10 +23,12 @@ getbranch(){
gitinit(){ gitinit(){
git init git init
git config user.name "${1:-$CONFIG_GIT_SERVER}"
git config user.email "${2:-$CONFIG_GIT_SERVER}"
git add . git add .
git commit -m "Initial commit" git commit -m "Initial commit"
git branch -M main git branch -M main
git remote add origin "${1:-$CONFIG_SERVER_GIT}" git remote add origin "${3:-$CONFIG_GIT_SERVER$(basename "$(pwd)")}"
git push -u origin main git push -u origin main
} }