Get latest stable Git with Ubuntu PPA
Using the latest Git version in Ubuntu gives additional robustness against corrupted histories when adding remotes.
These Terminal commands configure Ubuntu to use the latest Git release.
apt-add-repository ppa:git-core/ppa
apt update
apt upgrade