Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git installation needed on remote server which is access via ssh only

Tags:

git

I'm trying to do an access from a remote machine to a server machine which currently does not contain any git installation. The question is: Does the server machine need a git installation in any kind (i assume it needs) to work from the client only via ssh with git?

like image 229
khmarbaise Avatar asked Jun 04 '12 19:06

khmarbaise


1 Answers

Yes you need git on the server

Without git on the server, you can't push/pull to the remote. The protocol you use to act remotely on your git repo, doesn't change this.

Poor mans git

You can if you really need/want to just rsync your .git directory to a remote server. Because all files in the .git/objects directory are based on a hash, you won't get any collisions.

That would mean in principle:

# git push
rsync -rv .git server:repo.git

# git pull
rsync -rv server:repo.git .git
git reset HEAD --hard # Here lies the problem with this technique.
like image 174
AD7six Avatar answered Oct 29 '22 18:10

AD7six