Creating and deleting branches within your repository 在你的库中创建和删除分支

分支管理是 Git 工作流中重要的一部分。你可以直接在 Github 上管理分支。

Creating a branch 创建分支

在库的选择菜单中创建分支。只需要输入不重名的名字即可。

Creating and deleting branches within your repository 在你的库中创建和删除分支 - 图1

Deleting a branch 删除分支

同样的,如果你去库的分支页面,你可以删除一个分支,只要你有适当的访问权限,并且没有对它进行 pull request

Creating and deleting branches within your repository 在你的库中创建和删除分支 - 图2

How is this useful? 怎么用

我们建议在您的计算机上创建分支。这使得它更容易跟踪变化和与其他人合作。

在线的分支管理是在简单的情况下有用,如修复错别字或进行头脑风暴。在这里看看它是如何工作的:

  1. 在你的库中创建一个新的分支
  2. 创建编辑一个文件在你的库
  3. 创建 pull request 使其他人可以审查你的分支的变化。

更详细的方法,查看 GitHub 在浏览器的流程

参考:https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/#creating-a-branch