- fix git init
This commit is contained in:
parent
5895846530
commit
f0433b34c7
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue