I solved it in the following way:
-
go to the Glitch console and change the denyCurrentBranch parameter
git config receive.denyCurrentBranch updateInstead
-
Then you can push without any issues and undesirable consequences.
-
Note that you still need to refresh your Glitch project manually in the console, using the
refresh
command.