GitTorrent: A Decentralized GitHub
What I miss in the article or discussion is consistency of refs. The moment your remote is a distributed one, it may have two different values for HEAD in single point of time in different parts of network. 
If two clients push in this time, HEADs diverge even further.<p>So as in distributed databases, you  either:<p>* need to acquire exclusive lock on the repository metadata, or<p>* accept, that your push will be eventually discarded because you did not have up to date metadata