我想知道如何git-receive-pack有效,因为我完全不知道它会发生什么。谁能揭开这个谜团?
最佳答案
http://schacon.github.com/git/git-receive-pack.html
This command is usually not invoked directly by the end user. The UI for the protocol is on the git send-pack side, and the program pair is meant to be used to push updates to remote repository. For pull operations, see git-fetch-pack(1).
The command allows for creation and fast-forwarding of sha1 refs (heads/tags) on the remote end (strictly speaking, it is the local end git-receive-pack runs, but to the user who is sitting at the send-pack end, it is updating the remote. Confused?)
即使是编写手册页的人也认为它令人困惑,所以不要因为不理解而 blame 自己!
基本上,这是接收远程服务器上的提交的代码的一部分,当您执行 git push时,这些提交由本地计算机上的
.send-pack
打包和发送
了解其背后的细节并不重要——正如文档所说,这不是您应该实际键入的命令。
如果您真的对它的内部运作方式非常感兴趣,可以从以下几个不错的地方开始:
The Wikipedia Page on Git (Software) , The Git Website itself , 或者 The free book, Pro Git
或者,您可以随时前往 look the 'c' code up for that command在 github 上的源代码中。
关于git - git-receive-pack 是如何工作的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10662056/