Is it possible to change the default/root directory of where git looks for projects so you can clone a project like this:
git clone git@myserver.com:project.git
rather than like this:
git clone git@myserver.com:/var/www/html/project.git
I’ve seen git --git-dir=<path> in the help page but it seems that it only takes effect for that particular command rather than being a global setting – and that’s even if it does what I want it to do.
Can anyone help?
When you’re using ssh path, it always start in given user’s home directory. So for the example in the question to work, all you have to do is set HOME directory of
gituser to/var/www/html.