After working on a project for some time, the project is way bigger, and it is necessary to backup the git client on a remote server ?
On the remote server: (e.g. after ssh firstname.lastname@example.org…)
mkdi -p project/git cd git git init --bare
In the local git tree
git remote add barbaz email@example.com:~/project/git git push --all barbaz
Now, to have another copy on the remote server, for example, if the project is a web server, and you what to run the binary, etc:
mkdir project/prod cd project/prod git clone ../git/ . # make, whatever
After changes on the local copy: (from local dir)
git push barbaz
Update the prod tree on the server:
gut pull origin # again: make...