I have a server with a dedicated git
user and repositories
I\'m trying to use the git-shell method to allow my devs to work on several projects.
I\'m ab
You can use a git-shell-commands
directory to extend git-shell
with custom commands, these can then be remotely executed using ssh.
For example create ~git/git-shell-commands/newgit
with this content:
#!/bin/sh
mkdir -p ~/$1
cd ~/$1
git init --bare
Then chmod +x ~git/git-shell-commands/newgit
to allow execution.
To use it, run:
ssh git@server newgit newrepo.git
this is enough to create a new bare git repository, it can be cloned using:
git clone git@server:newrepo.git