How to avoid providing absolute repo path after git when cloning?

I am trying to host a git repository. Now I can clone git repo on any computer on the network with:

git clone gituser@192.168.0.133 :/home/gituser/repositories/gitosis-admin.git 

But I need to give an absolute repo location path.

Is it possible to clone without specifying a repo path? such as,

 git clone gituser@192.168.0.133 :gitosis-admin.git 

Thanks in advance,

+4
source share
1 answer

You should be able to clone using the path relative to your home directory on the remote computer. So, for example, git clone gituser@192.168.0.133 :/home/gituser/repositories/gitosis-admin.git can become git clone gituser@192.168.0.133 :repositories/gitosis-admin.git .

+3
source

All Articles