我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

Creating an issue or pull request

You can create an issue or pull request to propose and collaborate on changes to a repository.

Anyone can create an issue in a public repository that has issues enabled. Anyone with read permissions to a repository can create a pull request, but you must have write permissions to create a branch.

本文内容

About issues and pull requests

You can use issues to track ideas, bugs, tasks, and other information that's important to your project. You can create an issue in your project's repository with GitHub Desktop. For more information about issues, see "About issues."

After you create a branch and make changes to files in a project, you can create a pull request. With a pull request, you can propose, discuss, and iterate on changes before you merge the changes into the project. You can create a pull request in your project's repository with GitHub Desktop. For more information about pull requests, see "About pull requests."

Prerequisites

Before you create a pull request, you'll need to push changes to a branch on GitHub.

Creating an issue

  1. In the menu bar, use the Repository drop-down menu, then click Create Issue on GitHub.
    Repository value in the Branch menu
  2. On GitHub, click Get started to open an issue template or click Open a blank issue.
    Create new issue options
  1. In the menu bar, use the Repository drop-down menu, then click Create issue on GitHub.
    The Repository value in the Branch menu
  2. On GitHub, click Get started to open an issue template or click Open a blank issue.
    Create new issue options

Note: If issue templates aren't enabled in your current repository, GitHub Desktop will direct you to a blank issue on GitHub.

Creating a pull request

  1. Switch to the branch that you want to create a pull request for. For more information, see "Switching between branches."
  2. Click Create Pull Request. GitHub Desktop will open your default browser to take you to GitHub.
    The Create Pull Request button
  3. On GitHub, confirm that the branch in the base: drop-down menu is the branch where you want to merge your changes. Confirm that the branch in the compare: drop-down menu is the topic branch where you made your changes.
    Drop-down menus for choosing the base and compare branches
  4. 为您的拉取请求输标题和说明。
    拉取请求标题和描述字段
  5. 要创建可供审查的拉取请求,请单击 Create Pull Request(创建拉取请求)。 要创建草稿拉取请求,请使用下拉列表选择 Create Draft Pull Request(创建草稿拉取请求),然后单击 Draft Pull Request(草稿拉取请求)。 有关拉取请求草稿的更多信息,请参阅“关于拉取请求”。
    创建拉取请求按钮
  1. Switch to the branch that you want to create a pull request for. For more information, see "Switching between branches."
  2. Click Create Pull Request. GitHub Desktop will open your default browser to take you to GitHub.
    The Create Pull Request button
  3. On GitHub, confirm that the branch in the base: drop-down menu is the branch where you want to merge your changes. Confirm that the branch in the compare: drop-down menu is the topic branch where you made your changes.
    Drop-down menus for choosing the base and compare branches
  4. 为您的拉取请求输标题和说明。
    拉取请求标题和描述字段
  5. 要创建可供审查的拉取请求,请单击 Create Pull Request(创建拉取请求)。 要创建草稿拉取请求,请使用下拉列表选择 Create Draft Pull Request(创建草稿拉取请求),然后单击 Draft Pull Request(草稿拉取请求)。 有关拉取请求草稿的更多信息,请参阅“关于拉取请求”。
    创建拉取请求按钮

Further reading

问问别人

找不到要找的内容?

联系我们