Pro Git 2nd Edition 2.1.413
to move around. Let’s say you want to create a new branch called testing. You do this with the git branch command: $ git branch testing This creates a new pointer to the same commit you’re currently on pointing. This option is called --decorate. $ git log --oneline --decorate f30ab (HEAD -> master, testing) Add feature #32 - ability to add new formats to the central interface 34ac2 Fix bug #1328 - stack master and testing branches that are right there next to the f30ab commit. Switching Branches To switch to an existing branch, you run the git checkout command. Let’s switch to the new testing branch:0 码力 | 731 页 | 21.49 MB | 1 年前3Pro Git 2nd Edition 2.1.413
to move around. Let’s say you want to create a new branch called testing. You do this with the git branch command: $ git branch testing This creates a new pointer to the same commit you’re currently pointing. This option is called --decorate. $ git log --oneline --decorate f30ab (HEAD -> master, testing) Add feature #32 - ability to add new formats to the central interface 34ac2 Fix bug #1328 - stack master and testing branches that are right there next to the f30ab commit. Switching Branches To switch to an existing branch, you run the git checkout command. Let’s switch to the new testing branch:0 码力 | 501 页 | 17.96 MB | 1 年前3Pro Git 2nd Edition 2.1.413
to move around. Let’s say you want to create a new branch called testing. You do this with the git branch command: $ git branch testing This creates a new pointer to the same commit you’re currently on pointing. This option is called --decorate. $ git log --oneline --decorate f30ab (HEAD -> master, testing) Add feature #32 - ability to add new formats to the central interface 34ac2 Fix bug #1328 - stack master and testing branches that are right there next to the f30ab commit. Switching Branches To switch to an existing branch, you run the git checkout command. Let’s switch to the new testing branch:0 码力 | 691 页 | 13.35 MB | 1 年前3Pro Git 中文版 第2版 2.1.66
图表 11. 分支及其提交历史 分支创建 Git 是怎么创建新分支的呢? 很简单,它只是为你创建了一个可以移动的新的指针。 比如,创建一个 testing 分 支, 你需要使用 git branch 命令: $ git branch testing 这会在当前所在的提交对象上创建一个指针。 图表 12. 两个指向相同提交历史的分支 那么,Git 又是怎么知道当前在哪一个分支上呢? 也很简单,它有一个名为 log 命令查看各个分支当前所指的对象。 提供这一功能的参数是 --decorate。 $ git log --oneline --decorate f30ab (HEAD -> master, testing) add feature #32 - ability to add new formats to the central interface 34ac2 Fixed bug #1328 - stack project 正如你所见,当前 master 和 testing 分支均指向校验和以 f30ab 开头的提交对象。 分支切换 要切换到一个已存在的分支,你需要使用 git checkout 命令。 我们现在切换到新创建的 testing 分支 去: $ git checkout testing 这样 HEAD 就指向 testing 分支了。 68 图表 14. HEAD 指向当前所在的分支0 码力 | 501 页 | 19.30 MB | 1 年前3Pro Git 中文版 第2版 2.1.66
图表 11. 分支及其提交历史 分支创建 Git 是怎么创建新分支的呢? 很简单,它只是为你创建了一个可以移动的新的 指针。 比如,创建一个 testing 分支, 你需要使用 git branch 命令: $ git branch testing 这会在当前所在的提交对象上创建一个指针。 图表 12. 两个指向相同提交历史的分支 那么,Git 又是怎么知道当前在哪一个分支上呢? 也很简单,它有一个名为 命令查看各个分支当前所指的对象。 提供这一功 能的参数是 --decorate。 $ git log --oneline --decorate f30ab (HEAD -> master, testing) add feature #32 - ability to add new formats to the central interface 34ac2 Fixed bug #1328 - stack project 正如你所见,当前 master 和 testing 分支均指向校验和以 f30ab 开头的提交 对象。 分支切换 要切换到一个已存在的分支,你需要使用 git checkout 命令。 我们现在切换 到新创建的 testing 分支去: $ git checkout testing 这样 HEAD 就指向 testing 分支了。 图表 14. HEAD 指向当前所在的分支0 码力 | 670 页 | 13.59 MB | 1 年前3Gitea v1.21.1 中文文档
您想要的工作流文件。 不过,我们可以从一个简单的演示开始: 1. name: Gitea Actions Demo 2. run-name: ${{ gitea.actor }} is testing out Gitea Actions 使用Actions 快速入门 - 151 - 本文档使用 书栈网 · BookStack.CN 构建 3. on: [push] 4. 5. 本文档使用 书栈网 · BookStack.CN 构建 1. --- 2. 3. name: "Template Name" 4. about: "This template is for testing!" 5. title: "[TEST] " 6. ref: "main" 7. labels: 8. 9. - bug 10. - "help needed" 11. 12 is the template! 上面的示例表示用户从列表中选择一个工单模板时,列表会展示模板名称 Template Name 和模板描述 This template is for testing! 。 同时,标题会预先填充为 [TEST] ,而正文将预先填充 This is the template! 。 最 后,Issue 还会被分配两个标签, bug 和 help0 码力 | 303 页 | 3.88 MB | 1 年前3
共 6 条
- 1