diff --git a/attached_assets/Pasted--workspace-push-to-gitlab-sh-Push-to-GitLab-vt-alfacom-it--1760612848127_1760612848127.txt b/attached_assets/Pasted--workspace-push-to-gitlab-sh-Push-to-GitLab-vt-alfacom-it--1760612848127_1760612848127.txt new file mode 100644 index 0000000..bbca23f --- /dev/null +++ b/attached_assets/Pasted--workspace-push-to-gitlab-sh-Push-to-GitLab-vt-alfacom-it--1760612848127_1760612848127.txt @@ -0,0 +1,46 @@ + +~/workspace$ ./push-to-gitlab.sh +🚀 Push to GitLab (vt.alfacom.it) +======================================== + +📋 Modifiche da committare: + M .replit + M push-to-gitlab.sh +Vuoi procedere con il push? (y/N) y +Messaggio commit personalizzato (Enter per default): + +📦 Git add... +💾 Git commit... +On branch main +nothing to commit, working tree clean +~/workspace$ git add . +~/workspace$ git commit -m "Deploy: $(date '+%Y-%m-%d %H:%M:%S')" +On branch main +nothing to commit, working tree clean +~/workspace$ git push production main +error: unable to read askpass response from 'replit-git-askpass' +Username for 'https://git.alfacom.it': marco@lanzara.eu +error: unable to read askpass response from 'replit-git-askpass' +Password for 'https://marco%40lanzara.eu@git.alfacom.it': +To https://git.alfacom.it/marco/VigilanzaTurni.git + ! [rejected] main -> main (fetch first) +error: failed to push some refs to 'https://git.alfacom.it/marco/VigilanzaTurni.git' +hint: Updates were rejected because the remote contains work that you do not +hint: have locally. This is usually caused by another repository pushing to +hint: the same ref. If you want to integrate the remote changes, use +hint: 'git pull' before pushing again. +hint: See the 'Note about fast-forwards' in 'git push --help' for details. +~/workspace$ git push production main +error: unable to read askpass response from 'replit-git-askpass' +Username for 'https://git.alfacom.it': marco +error: unable to read askpass response from 'replit-git-askpass' +Password for 'https://marco@git.alfacom.it': +To https://git.alfacom.it/marco/VigilanzaTurni.git + ! [rejected] main -> main (fetch first) +error: failed to push some refs to 'https://git.alfacom.it/marco/VigilanzaTurni.git' +hint: Updates were rejected because the remote contains work that you do not +hint: have locally. This is usually caused by another repository pushing to +hint: the same ref. If you want to integrate the remote changes, use +hint: 'git pull' before pushing again. +hint: See the 'Note about fast-forwards' in 'git push --help' for details. +~/workspace$ \ No newline at end of file diff --git a/push-to-gitlab.sh b/push-to-gitlab.sh old mode 100755 new mode 100644 index b811caf..9080404 --- a/push-to-gitlab.sh +++ b/push-to-gitlab.sh @@ -56,6 +56,11 @@ echo -e "${GREEN}💾 Git commit...${NC}" git commit -m "$COMMIT_MSG" echo -e "${GREEN}📤 Git push to production...${NC}" + +# Pull prima di pushare per evitare conflitti +echo -e "${YELLOW}Sincronizzazione con remote...${NC}" +git pull production main --no-rebase || echo -e "${YELLOW}⚠️ Potrebbero esserci conflitti da risolvere${NC}" + git push production main echo -e "\n${GREEN}✅ Push completato!${NC}"