Common situation:
deployer$ git clone git://gitserver/project.git deployer$ cd project deployer$ ./deploy Lots of errors! deployer$ hack --until-it-works deploy deployer$ git commit -m "fixed it" deploy Oops, now I can't push because deployment-account doesn't have the proper keys. So, back to my own account.
larsmans$ cd /tmp larsmans$ git clone /path/to/deployed/project larsmans$ cd project But now I can't push because the remote is not set to the original clone's remote.
larsmans$ git remote -v origin /path/to/deployed/project/ (fetch) origin /path/to/deployed/project/ (push) Can I clone a local directory and get the remotes along? I could easily write a script for this, but maybe Git has it built-in. I couldn't find a relevant option in git-clone(1); --mirror didn't do the trick.