문제

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)

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top