diff --git a/func/git.sh b/func/git.sh index 1e8ab60..b4b5622 100644 --- a/func/git.sh +++ b/func/git.sh @@ -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