fleschutz / PowerShell

500+ PowerShell scripts (.ps1) for every system!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sync-repo.ps1 should pull first

k7sleeper opened this issue · comments

Shouldn't sync-repo.ps1 execute git pull before git push? Otherwise, you will often get

! [rejected] develop -> develop (fetch first) error: failed to push some refs to 'https://bitbucket.materna.net/scm/ipslhonce/ui.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. ⚠️ Error in line 31: 'git push' failed

My git-sync command executes first git pull --all and then git push. That worked well for years!

Hi Klaus, yes, I think you're right. This has been changed now.