Pro Git 2nd Edition 2.1.413project, Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again occurrences of that string. For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call: $ git log -S function_name The last really useful option Options to limit the output of git log we’ll list these and a few other common options for your reference. Table 3. Options to limit the output of git log Option Description -Show only the last n 0 码力 | 731 页 | 21.49 MB | 1 年前3
Pro Git 2nd Edition 2.1.413project, Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again, occurrences of that string. For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call: $ git log -S function_name The last really useful option Options to limit the output of git log we’ll list these and a few other common options for your reference. Table 3. Options to limit the output of git log Option Description -Show only the last n 0 码力 | 501 页 | 17.96 MB | 1 年前3
Pro Git 2nd Edition 2.1.413 project, Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again occurrences of that string. For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call: $ git log -S function_name The last really useful option Options to limit the output of git log we’ll list these and a few other common options for your reference. Table 3. Options to limit the output of git log Option Description -Show only the last n 0 码力 | 691 页 | 13.35 MB | 1 年前3
Pro Git 中文版 第2版 2.1.66底层命令 与上层命令 读到更多相关内容)。 这个命令在日常 Git 操作中基本不会用到,但在显示服务器上有哪些引用 (reference)时很管用。 如果在我们之前用过的 “blink” 版本库上使用这个命令,我们会得到一个版本库里所有的分支,标签和其它引 用(reference)的列表。 $ git ls-remote https://github.com/schacon/blink 10d 现在的问题是,当你执行 git branch时,Git 如何知道最新提交的 SHA-1 值呢? 答案是 HEAD 文 件。 427 HEAD 文件通常是一个符号引用(symbolic reference),指向目前所在的分支。 所谓符号引用,表示它是一个指向其他引用的指针。 然而在某些罕见的情况下,HEAD 文件可能会包含一个 git 对象的 SHA-1 值。 当你在检出一个标签、提交或远程 内核版本库同样有一个不指向提交对象的标签对象——首个被创建的标签对象所指向的是最初被引入版本 库的那份内核源码所对应的树对象。 远程引用 我们将看到的第三种引用类型是远程引用(remote reference)。 如果你添加了一个远程版本库并对其执行过 推送操作,Git 会记录下最近一次推送操作时每一个分支所对应的值,并保存在 refs/remotes 目录下。 例 如,你可以添加一个叫做 origin 0 码力 | 501 页 | 19.30 MB | 1 年前3
Pro Git 中文版 第2版 2.1.66在 日 常 Git 操 作 中 基 本 不 会 用 到 , 但 在 显 示 服 务 器 上 有 哪 些 引 用 (reference)时很管用。 如果在我们之前用过的 “blink” 版本库上使用这个命令,我们会得到一个版本 库里所有的分支,标签和其它引用(reference)的列表。 $ git ls-remote https://github.com/schacon/blink 10d 现在的问题是,当你执行 git branch时,Git 如何知道最新提交的 SHA-1 值呢? 答案是 HEAD 文件。 HEAD 文件通常是一个符号引用(symbolic reference),指向目前所在的 分支。 所谓符号引用,表示它是一个指向其他引用的指针。 然而在某些罕见的情况下,HEAD 文件可能会包含一个 git 对象的 SHA-1 值。 当你在检出一个标签、提交或远程分支,让你的仓库变成 内核版本库同样有一个不指向提交对象的标签对象——首个被创建的标 签对象所指向的是最初被引入版本库的那份内核源码所对应的树对象。 远程引用 我们将看到的第三种引用类型是远程引用(remote reference)。 如果你添 加了一个远程版本库并对其执行过推送操作,Git 会记录下最近一次推送操作 时每一个分支所对应的值,并保存在 refs/remotes 目录下。 例如,你可以添 加一个叫做 0 码力 | 670 页 | 13.59 MB | 1 年前3
Gitea v1.21.1 中文文档"2222:2222" MySQL 或 PostgreSQL 容器需要单独创建。 你可以选择使用自定义用户 (遵循 —user 标志定义 https://docs.docker.com/engine/reference/run/#user)。%E3%80%82) 例如,要克隆主机用户 git 的定义,请使用命令 id -u git 并将其添加到 docker-compose.yml 文件中: 事件,在 GitHub Actions 中 ref 是 refs/pull/:prNumber/merge ,它指向这个拉取请求合并提交的一 个预览。但是 Gitea 没有这种 reference。 因此,Gitea Actions 中 ref 是 refs/pull/:prNumber/head ,它指向这个拉取请求 的头分支而不是合并提交的预览。 Gitea Actions0 码力 | 303 页 | 3.88 MB | 1 年前3
共 6 条
- 1













