Domanda

Mercurial's Command Server allows to issue commands to a Mercurial repository over a pipe through a special protocol... it is like a "webservice" of sorts.

https://www.mercurial-scm.org/wiki/CommandServer

Is there anything similar in Git in order to manipulate remote Git repositories to do things you need? (like switching to another branch or updating to another revision)

È stato utile?

Soluzione

Don't know exactly, what the mercurial command server does, but usually git utilizes ssh as its primary remote protocol.

ssh serverName "cd /path/to/repo; git pull"
ssh serverName "git --git-dir=/path/to/repo pull"

Sends a shell command to a remote ssh server serverName. As long as the user you log in with has the rights to do it, you can everything, what the remote git installation provides.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top