Linux git server change directory ssh

So I have setup a alpine Linux docker ssh git server that runs CMD ["/usr/sbin/sshd", "-D"] and I’m trying to make it to where we can do

git clone [email protected]:git/test.git

instead of

git clone [email protected]:/home/git/test.git

The user test can only login with a ssh key and it’s shell as been set to /usr/bin/git-shell with the ~/git-shell-commands/no-interactive-login set

I tried so far adding cd /home to .profile .bashrc, prepending commands to the public key in authorized_keys and changing the users home directory in /etc/passwd to no avail or introducing other issues like where sshd looks for keys(default being ~/.ssh/authorized_keys)

I’m trying to come up with a way that is most easiest and can work with multiple users. Is there anyway to get git-shell to run cd /home with out any input from the user?

I have also looked into the git server daemon(this uses the git protocol instead of ssh which isn’t very good) –base-path but I’d rather not toss out what Iv’e already made for something else that may not do what I want over all.

Source: StackOverflow