It's internal development (Portugal) developing something for an internal department (Germany). There's nothing professional going on here so we are far from any ci/cd pipeline. One person can change everything, because it's just two developers (1 frontend, 1 backend).
Plus things are busy and we (team in Germany) are way more interested in this thing working well than they (team in Portugal) are since they have higher priority tasks..
Of course I can say fuck it and live with the poor quality caused by circumstances that were partially caused by poor management decisions of the company but I'm not able to care little enough.
Fix your shit and it won't stop you from committing.
It's also usually only on certain branches, so you can make a branch where you break things and then fix them before you merge to testing/main/whatever.
If you have code that is not complete it is not qualified to be deployed. Cut work items into smaller chunks but never deploy not fully, 100% working and tested stuff. Not even on dev.
That seems reasonable to perform on protected branches, but I'm not a fan of protecting all branches. That could leave valuable code with a single copy on a dev machine. I'd rather have it pushed to an unprotected branch and then be checked on merge instead of push.
I agree. I absolutely hate when some pesky git hook rejects some debug code I wrote that I want to commit. Mind you, commit, not integrate. This is the situation where I whip out git commit -n.
Even better: use pre-commit. It supports all kinds of stuff without a lot of config. This gets you (and GP) a lot of the features of a full-blown CI pipeline, but it all runs locally before anyone breaks anything.
If you have tests you have to automate them and have a pipeline which stops any deployments when these tests fail.
You definitely have a mindset issue and not a management or tool issue.
I am not sorry but as a DevOps Engineer I can only say you guys are a lousy hack and should probably seek a different job.