git - git-receive-pack 是如何工作的?

标签 git

我想知道如何git-receive-pack有效,因为我完全不知道它会发生什么。谁能揭开这个谜团?

最佳答案

According to the man page :

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 pushsend-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 上的源代码中。

http://git-scm.com/

关于git - git-receive-pack 是如何工作的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10662056/

相关文章:

git - "Move"文件到 Git 中自己的分支

php - Git 将 PHP 应用程序部署到多个 EC2 节点

GIT,工作目录是如何填充的

git - 如何克隆特定的 Git 标签

git - 我是如何越过溪流的,我该如何解开它们?

git - 在 Git 中运行预提交 Hook 。有没有办法验证脚本是否正在运行?

git - 使用 Git 时在 Visual Studio 2013 中设置 Beyond Compare

git - 与 Git 和 KDiff3 进行三向比较

.gitignore 目录上的 git 警告 "unable to access permission denied"

Git 错误 : OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to