Git does not have a consensus mechanism. You have your copy of the repository, and someone else has their copy. If you want to push your changes to a remote, if there were divergent changes you need to first pull the remote, merge the changes and resolve conflicts, and then push. The remote can change their version of the repo anytime they want in any way they want. Also, when you try to push a change, it is up to the remote to accept it or not, they can deny it for whatever reason.
The point of a blockchain is that 1. There is a distributed consensus about the state of the blockchain (the one accepted by 51%+ of nodes) and 2. No one can alter information relating to your wallet without your keys. Git lacks either of these properties and these properties cannot be introduced without a centralized system like Github/Gitlab. Thus, Git is just a decentralized protocol, not a blockchain.
I'd agree if blockchains didn't also fork based on disagreements of the next block.
> No one can alter information relating to your wallet without your keys
Git has signing of commits etc. So the equivalent (no one can alter your presentation of the view of the code) can be enforced.
- - -
To focus on 1 specific concept of consensus, would be to also claim the very common idea of private blockchains is poorly named.