- fix git init
This commit is contained in:
parent
fca4d296bb
commit
a75d4db48e
15
func/git.sh
15
func/git.sh
|
|
@ -35,6 +35,19 @@ gitinit(){
|
||||||
git config --global --replace-all user.name "${git_user}"
|
git config --global --replace-all user.name "${git_user}"
|
||||||
git config --global --replace-all user.email "${git_email}"
|
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"
|
msg_info "Init git repository"
|
||||||
git init
|
git init
|
||||||
git add .
|
git add .
|
||||||
|
|
@ -63,7 +76,7 @@ gitinit(){
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Push repo on git server
|
# 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}"
|
msg_error "Error while pushing to ${repo_name}"
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue