New translation batch for cn (#32904)
This commit is contained in:
@@ -576,7 +576,7 @@ translations/zh-CN/content/admin/identity-and-access-management/using-built-in-a
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-support-for-your-idps-conditional-access-policy.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md,rendering error
|
||||
@@ -725,6 +725,7 @@ translations/zh-CN/content/code-security/secret-scanning/protecting-pushes-with-
|
||||
translations/zh-CN/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md,rendering error
|
||||
translations/zh-CN/content/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database.md,rendering error
|
||||
translations/zh-CN/content/code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities.md,rendering error
|
||||
translations/zh-CN/content/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability.md,rendering error
|
||||
translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository.md,rendering error
|
||||
translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md,rendering error
|
||||
translations/zh-CN/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md,rendering error
|
||||
@@ -748,7 +749,6 @@ translations/zh-CN/content/communities/documenting-your-project-with-wikis/about
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md,rendering error
|
||||
translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md,rendering error
|
||||
translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md,broken liquid tags
|
||||
@@ -787,7 +787,7 @@ translations/zh-CN/content/education/manage-coursework-with-github-classroom/int
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md,broken liquid tags
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md,rendering error
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-a-group-assignment.md,rendering error
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-an-individual-assignment.md,broken liquid tags
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-an-individual-assignment.md,rendering error
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md,broken liquid tags
|
||||
translations/zh-CN/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md,broken liquid tags
|
||||
translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md,rendering error
|
||||
@@ -820,7 +820,6 @@ translations/zh-CN/content/get-started/quickstart/github-glossary.md,broken liqu
|
||||
translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md,rendering error
|
||||
translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md,rendering error
|
||||
translations/zh-CN/content/get-started/using-git/about-git-rebase.md,rendering error
|
||||
translations/zh-CN/content/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository.md,rendering error
|
||||
translations/zh-CN/content/get-started/using-github/github-mobile.md,rendering error
|
||||
translations/zh-CN/content/get-started/using-github/keyboard-shortcuts.md,rendering error
|
||||
translations/zh-CN/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md,broken liquid tags
|
||||
@@ -844,12 +843,13 @@ translations/zh-CN/content/graphql/reference/unions.md,rendering error
|
||||
translations/zh-CN/content/issues/organizing-your-work-with-project-boards/managing-project-boards/changing-project-board-visibility.md,rendering error
|
||||
translations/zh-CN/content/issues/organizing-your-work-with-project-boards/managing-project-boards/copying-a-project-board.md,rendering error
|
||||
translations/zh-CN/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md,rendering error
|
||||
translations/zh-CN/content/issues/planning-and-tracking-with-projects/creating-projects/migrating-from-projects-classic.md,broken liquid tags
|
||||
translations/zh-CN/content/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.md,rendering error
|
||||
translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md,rendering error
|
||||
translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md,rendering error
|
||||
translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md,broken liquid tags
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md,broken liquid tags
|
||||
@@ -937,6 +937,7 @@ translations/zh-CN/content/repositories/releasing-projects-on-github/managing-re
|
||||
translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md,rendering error
|
||||
translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md,rendering error
|
||||
translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md,rendering error
|
||||
translations/zh-CN/content/repositories/working-with-files/using-files/viewing-a-file.md,rendering error
|
||||
translations/zh-CN/content/rest/activity/notifications.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/apps/oauth-applications.md,rendering error
|
||||
translations/zh-CN/content/rest/codespaces/codespaces.md,broken liquid tags
|
||||
@@ -962,7 +963,7 @@ translations/zh-CN/content/rest/guides/traversing-with-pagination.md,rendering e
|
||||
translations/zh-CN/content/rest/guides/working-with-comments.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/migrations/source-imports.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/overview/api-previews.md,rendering error
|
||||
translations/zh-CN/content/rest/overview/other-authentication-methods.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/overview/other-authentication-methods.md,rendering error
|
||||
translations/zh-CN/content/rest/overview/permissions-required-for-github-apps.md,rendering error
|
||||
translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md,rendering error
|
||||
translations/zh-CN/content/rest/overview/troubleshooting.md,broken liquid tags
|
||||
@@ -1135,6 +1136,7 @@ translations/zh-CN/data/reusables/organizations/billing_plans.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/member-privileges.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/navigate-to-org.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/organization-wide-project.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/organizations/repository-defaults.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/security-and-analysis.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/security.md,rendering error
|
||||
|
||||
|
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Privately reporting a security vulnerability
|
||||
intro: Some public repositories configure security advisories so that anyone can report security vulnerabilities directly and privately to the maintainers.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
miniTocMaxHeadingLevel: 3
|
||||
topics:
|
||||
- Security advisories
|
||||
- Vulnerabilities
|
||||
shortTitle: Privately reporting
|
||||
---
|
||||
|
||||
{% data reusables.security-advisory.private-vulnerability-reporting-beta %}
|
||||
|
||||
{% data reusables.security-advisory.private-vulnerability-reporting-enable %}
|
||||
|
||||
## About privately reporting a security vulnerability
|
||||
|
||||
Security researchers often feel responsible for alerting users to a vulnerability that could be exploited. If there are no clear instuctions about contacting maintainers of the repository containing the vulnerability, security researchers may have no other choice but to post about the vulnerability on social media, send direct messages to the maintainer, or even create public issues. This situation can potentially lead to a public disclosure of the vulnerability details.
|
||||
|
||||
Private vulnerability reporting makes it easy for security researchers to report vulnerabilities directly to repository maintainer using a simple form.
|
||||
|
||||
For security researchers, the benefits of using private vulnerability reporting are:
|
||||
- Less frustration, and less time spent trying to figure out how to contact the maintainer.
|
||||
- A smoother process for disclosing and discussing vulnerability details.
|
||||
- The opportunity to discuss vulnerability details privately with repository maintainer.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If the repository doesn't have private vulnerabiliy reporting enabled, you need to initiate the reporting process by following the instructions in the security policy for the repository, or create an issue asking the maintainers for a preferred security contact. For more information, see "[About coordinated disclosure of security vulnerabilities](/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities#about-reporting-and-disclosing-vulnerabilities-in-projects-on-github)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Privately reporting a security vulnerability
|
||||
|
||||
Security researchers can privately report a security vulnerability to repository maintainers.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-security %}
|
||||
{% data reusables.repositories.sidebar-advisories %}
|
||||
1. Click **Report a vulnerability** to open the advisory form.
|
||||
|
||||

|
||||
|
||||
2. Fill in the advisory details form.
|
||||
{% tip %}
|
||||
|
||||
**Tip:** In this form, only the title and description are mandatory. (In the general draft security advisory form, which the repository maintainer initiates, specifying the ecosystem is also required.) However, we recommend security researchers provide as much information as possible on the form so that the maintainers can make an informed decision about the submitted report. You can adopt the template used by our security researchers from the {% data variables.product.prodname_security %}, which is available on the [`github/securitylab` repository](https://github.com/github/securitylab/blob/main/docs/report-template.md)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
For more information about the fields available and guidance on filling in the form, see "[Creating a repository security advisory](/code-security/security-advisories/repository-security-advisories/creating-a-repository-security-advisory)" and "[Best practices for writing repository security advisories](/code-security/security-advisories/guidance-on-reporting-and-writing/best-practices-for-writing-repository-security-advisories)."
|
||||
|
||||
1. At the bottom of the form, click **Submit report**. {% data variables.product.prodname_dotcom %} will display a message letting you know that maintainers have been notified and that you have a pending credit for this security advisory.
|
||||
|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** When the report is submitted, {% data variables.product.prodname_dotcom %} automatically adds the reporter of the vulnerability as a collaborator and as a credited user on the proposed advisory.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
1. Optionally, click **Start a temporary private fork** if you want to start to fix the issue. Note that only the repository maintainer can merge that private fork.
|
||||
|
||||

|
||||
|
||||
The next steps depend on the action taken by the repository maintainer. For more information, see "[Managing privately reported security vulnerabilities](/code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities)."
|
||||
@@ -12,11 +12,11 @@ children:
|
||||
- /security-in-github-codespaces
|
||||
- /performing-a-full-rebuild-of-a-container
|
||||
- /disaster-recovery-for-github-codespaces
|
||||
ms.openlocfilehash: 87692cd862e791f3e6ffa2be2b07f34c6158e617
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 223d3b146d829f129de39b43b51b6ab9e8aef411
|
||||
ms.sourcegitcommit: 3ff64a8c8cf70e868c10105aa6bbf6cd4f78e4d3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159195'
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: '148180801'
|
||||
---
|
||||
|
||||
|
||||
@@ -1,27 +1,32 @@
|
||||
---
|
||||
title: Syntax for GitHub's form schema
|
||||
intro: 'You can use {% data variables.product.company_short %}''s form schema to configure forms for supported features.'
|
||||
title: GitHub 表单架构的语法
|
||||
intro: '您可以使用 {% data variables.product.company_short %} 的表单架构来配置支持的功能。'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
topics:
|
||||
- Community
|
||||
ms.openlocfilehash: 3a8a21f04582b87741ef80755e92fbc859921bb5
|
||||
ms.sourcegitcommit: 06d16bf9a5c7f3e7107f4dcd4d06edae5971638b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: '148179667'
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.company_short %}'s form schema is currently in beta and subject to change.
|
||||
注意:{% data variables.product.company_short %} 的表单架构目前为 beta 版本,可能会有变动。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## About {% data variables.product.company_short %}'s form schema
|
||||
## 关于 {% data variables.product.company_short %} 的表单架构
|
||||
|
||||
You can use {% data variables.product.company_short %}'s form schema to configure forms for supported features. For more information, see "[Configuring issue templates for your repository](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms)."
|
||||
您可以使用 {% data variables.product.company_short %} 的表单架构来配置支持的功能。 有关详细信息,请参阅“[为存储库配置问题模板](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms)”。
|
||||
|
||||
A form is a set of elements for requesting user input. You can configure a form by creating a YAML form definition, which is an array of form elements. Each form element is a set of key-value pairs that determine the type of the element, the properties of the element, and the constraints you want to apply to the element. For some keys, the value is another set of key-value pairs.
|
||||
表单是请求用户输入的一组元素。 您可以通过创建 YAML 表单定义(这是一个表单元素阵列)来配置表单。 每个表单元素是一组确定元素类型、元素属性以及要应用于元素的约束的键值对。 对于某些键,值是另一组键值对。
|
||||
|
||||
For example, the following form definition includes four form elements: a text area for providing the user's operating system, a dropdown menu for choosing the software version the user is running, a checkbox to acknowledge the Code of Conduct, and Markdown that thanks the user for completing the form.
|
||||
例如,以下表单定义包括四种表单元素:用于提供用户操作系统的文本区域、用于选择用户运行的软件版本的下拉菜单、用于确认行为准则的复选框以及感谢用户完成表单的 Markdown。
|
||||
|
||||
```yaml{:copy}
|
||||
- type: textarea
|
||||
@@ -55,48 +60,48 @@ For example, the following form definition includes four form elements: a text a
|
||||
value: "Thanks for completing our form!"
|
||||
```
|
||||
|
||||
## Keys
|
||||
## 密钥
|
||||
|
||||
For each form element, you can set the following keys.
|
||||
对于每个表单元素,您可以设置以下键。
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
| `type` | The type of element that you want to define. | Required | String | {% octicon "dash" aria-label="The dash icon" %} | <ul><li>`checkboxes`</li><li>`dropdown`</li><li>`input`</li><li>`markdown`</li><li>`textarea`</li></ul> |
|
||||
| `id` | The identifier for the element, except when `type` is set to `markdown`. {% data reusables.form-schema.id-must-be-unique %} If provided, the `id` is the canonical identifier for the field in URL query parameter prefills. | Optional | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `attributes` | A set of key-value pairs that define the properties of the element. | Required | Map | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `validations` | A set of key-value pairs that set constraints on the element. | Optional | Map | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `type` | 您想要定义的元素类型。 | 必须 | String | {% octicon "dash" aria-label="The dash icon" %} | <ul><li>`checkboxes`</li><li>`dropdown`</li><li>`input`</li><li>`markdown`</li><li>`textarea`</li></ul> |
|
||||
| `id` | 元素的标识符,除非 `type` 设置为 `markdown`。 {% data reusables.form-schema.id-must-be-unique %} 如果提供,`id` 是 URL 查询参数预填中字段的规范标识符。 | 可选 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `attributes` | 定义元素属性的一组键值对。 | 必需 | 映射 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `validations` | 设置元素约束的一组键值对。 | 可选 | 映射 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
|
||||
You can choose from the following types of form elements. Each type has unique attributes and validations.
|
||||
您可以从以下类型的表单元素中选择。 每个类型都有唯一的属性和验证。
|
||||
|
||||
| Type | Description |
|
||||
| 类型 | 说明 |
|
||||
| ---- | ----------- |
|
||||
| [`markdown`](#markdown) | Markdown text that is displayed in the form to provide extra context to the user, but is **not submitted**. |
|
||||
| [`textarea`](#textarea) | A multi-line text field. |
|
||||
| [`input`](#input) | A single-line text field. |
|
||||
| [`dropdown`](#dropdown) | A dropdown menu. |
|
||||
| [`checkboxes`](#checkboxes) | A set of checkboxes. |
|
||||
| [`markdown`](#markdown) | Markdown 文本显示在表单中,为用户提供额外的上下文,但并未提交。 |
|
||||
| [`textarea`](#textarea) | 多行文本字段。 |
|
||||
| [`input`](#input) | 单行文本字段。 |
|
||||
| [`dropdown`](#dropdown) | 下拉菜单。 |
|
||||
| [`checkboxes`](#checkboxes) | 一组复选框。 |
|
||||
|
||||
### `markdown`
|
||||
|
||||
You can use a `markdown` element to display Markdown in your form that provides extra context to the user, but is not submitted.
|
||||
可以使用 `markdown` 元素在表单中显示 Markdown,为用户提供额外的上下文,但不提交。
|
||||
|
||||
#### Attributes
|
||||
#### 属性
|
||||
|
||||
{% data reusables.form-schema.attributes-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
| `value` | The text that is rendered. Markdown formatting is supported. | Required | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `value` | 渲染的文本。 支持 Markdown 格式。 | 必须 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tips:** YAML processing will treat the hash symbol as a comment. To insert Markdown headers, wrap your text in quotes.
|
||||
提示:YAML 处理将哈希符号视为评论。 要插入 Markdown 标题,请用引号括住文本。
|
||||
|
||||
For multi-line text, you can use the pipe operator.
|
||||
对于多行文本,您可以使用竖线运算符。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
#### Example
|
||||
#### 示例
|
||||
|
||||
```YAML{:copy}
|
||||
body:
|
||||
@@ -111,29 +116,29 @@ body:
|
||||
|
||||
### `textarea`
|
||||
|
||||
You can use a `textarea` element to add a multi-line text field to your form. Contributors can also attach files in `textarea` fields.
|
||||
可以使用 `textarea` 元素向表单添加多行文本字段。 参与者还可以在 `textarea` 字段中附加文件。
|
||||
|
||||
#### Attributes
|
||||
#### 属性
|
||||
|
||||
{% data reusables.form-schema.attributes-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
| `label` | A brief description of the expected user input, which is also displayed in the form. | Required | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | A description of the text area to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `placeholder` | A semi-opaque placeholder that renders in the text area when empty. | Optional | String | Empty String | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `value` | Text that is pre-filled in the text area. | Optional | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `render` | If a value is provided, submitted text will be formatted into a codeblock. When this key is provided, the text area will not expand for file attachments or Markdown editing. | Optional | String | {% octicon "dash" aria-label="The dash icon" %} | Languages known to {% data variables.product.prodname_dotcom %}. For more information, see [the languages YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). |
|
||||
| `label` | 预期用户输入的简短描述,也以表单形式显示。 | 必须 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | 提供上下文或指导的文本区域的描述,以表单形式显示。 | 可选 | String | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `placeholder` | 半透明的占位符,在文本区域空白时呈现。 | 可选 | String | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `value` | 在文本区域中预填充的文本。 | 可选 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `render` | 如果提供了值,提交的文本将格式化为代码块。 提供此键时,文本区域将不会扩展到文件附件或 Markdown 编辑。 | 可选 | String | {% octicon "dash" aria-label="The dash icon" %} | {% data variables.product.prodname_dotcom %} 已知的语言。 有关详细信息,请参阅[语言 YAML 文件](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)。 |
|
||||
|
||||
#### Validations
|
||||
#### 验证
|
||||
|
||||
{% data reusables.form-schema.validations-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
{% data reusables.form-schema.required-key %}
|
||||
|
||||
#### Example
|
||||
#### 示例
|
||||
|
||||
```YAML{:copy}
|
||||
body:
|
||||
@@ -154,28 +159,28 @@ body:
|
||||
|
||||
### `input`
|
||||
|
||||
You can use an `input` element to add a single-line text field to your form.
|
||||
可以使用 `input` 元素向表单添加单行文本字段。
|
||||
|
||||
#### Attributes
|
||||
#### 属性
|
||||
|
||||
{% data reusables.form-schema.attributes-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
| `label` | A brief description of the expected user input, which is also displayed in the form. | Required | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | A description of the field to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `placeholder` | A semi-transparent placeholder that renders in the field when empty. | Optional | String | Empty String | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `value` | Text that is pre-filled in the field. | Optional | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `label` | 预期用户输入的简短描述,也以表单形式显示。 | 必须 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | 提供上下文或指导的字段的描述,以表单形式显示。 | 可选 | String | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `placeholder` | 半透明的占位符,在字段空白时呈现。 | 可选 | String | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `value` | 字段中预填的文本。 | 可选 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
|
||||
#### Validations
|
||||
#### 验证
|
||||
|
||||
{% data reusables.form-schema.validations-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
{% data reusables.form-schema.required-key %}
|
||||
|
||||
#### Example
|
||||
#### 示例
|
||||
|
||||
```YAML{:copy}
|
||||
body:
|
||||
@@ -191,28 +196,28 @@ body:
|
||||
|
||||
### `dropdown`
|
||||
|
||||
You can use a `dropdown` element to add a dropdown menu in your form.
|
||||
可以使用 `dropdown` 元素在表单中添加下拉菜单。
|
||||
|
||||
#### Attributes
|
||||
#### 属性
|
||||
|
||||
{% data reusables.form-schema.attributes-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
| `label` | A brief description of the expected user input, which is displayed in the form. | Required | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | A description of the dropdown to provide extra context or guidance, which is displayed in the form. | Optional | String | Empty String | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `multiple` | Determines if the user can select more than one option. | Optional | Boolean | false | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `options` | An array of options the user can choose from. Cannot be empty and all choices must be distinct. | Required | String array | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `label` | 预期用户输入的简短描述,以表单形式显示。 | 必须 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | 提供上下文或指导的下拉列表的描述,以表单形式显示。 | 可选 | String | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `multiple` | 确定用户是否可以选择多个选项。 | 可选 | Boolean | false | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `options` | 用户可以选择的选项阵列。 不能为空,所有选择必须是不同的。 | 必需 | 字符串数组 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
|
||||
#### Validations
|
||||
#### 验证
|
||||
|
||||
{% data reusables.form-schema.validations-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
{% data reusables.form-schema.required-key %}
|
||||
|
||||
#### Example
|
||||
#### 示例
|
||||
|
||||
```YAML{:copy}
|
||||
body:
|
||||
@@ -231,29 +236,29 @@ body:
|
||||
|
||||
### `checkboxes`
|
||||
|
||||
You can use the `checkboxes` element to add a set of checkboxes to your form.
|
||||
可以使用 `checkboxes` 元素向表单添加一组复选框。
|
||||
|
||||
#### Attributes
|
||||
#### 属性
|
||||
|
||||
{% data reusables.form-schema.attributes-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
| `label` | A brief description of the expected user input, which is displayed in the form. | Required | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | A description of the set of checkboxes, which is displayed in the form. Supports Markdown formatting. | Optional | String | Empty String | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `options` | An array of checkboxes that the user can select. For syntax, see below. | Required | Array | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `label` | 预期用户输入的简短描述,以表单形式显示。 | 必须 | String | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `description` | 复选框集的描述,以表单形式显示。 支持 Markdown 格式。 | 可选 | String | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
| `options` | 用户可以选择的复选框阵列。 有关语法,请参阅下文。 | 必需 | 数组 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} |
|
||||
|
||||
{% data reusables.form-schema.options-syntax %}
|
||||
|
||||
#### Validations
|
||||
#### 验证
|
||||
|
||||
{% data reusables.form-schema.validations-intro %}
|
||||
|
||||
| Key | Description | Required | Type | Default | Valid values |
|
||||
| 密钥 | 说明 | 必选 | 类型 | 默认 | 有效值 |
|
||||
| --- | ----------- | -------- | ---- | ------- | ------- |
|
||||
{% data reusables.form-schema.required-key %}
|
||||
|
||||
#### Example
|
||||
#### 示例
|
||||
|
||||
```YAML{:copy}
|
||||
body:
|
||||
@@ -268,6 +273,6 @@ body:
|
||||
- label: Linux
|
||||
```
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
- [YAML](https://yaml.org)
|
||||
|
||||
@@ -1,43 +1,49 @@
|
||||
---
|
||||
title: Splitting a subfolder out into a new repository
|
||||
title: 将子文件夹拆分成新仓库
|
||||
redirect_from:
|
||||
- /articles/splitting-a-subpath-out-into-a-new-repository
|
||||
- /articles/splitting-a-subfolder-out-into-a-new-repository
|
||||
- /github/using-git/splitting-a-subfolder-out-into-a-new-repository
|
||||
- /github/getting-started-with-github/splitting-a-subfolder-out-into-a-new-repository
|
||||
- /github/getting-started-with-github/using-git/splitting-a-subfolder-out-into-a-new-repository
|
||||
intro: You can turn a folder within a Git repository into a brand new repository.
|
||||
intro: 您可以将 Git 仓库内的文件夹变为全新的仓库。
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
shortTitle: Splitting a subfolder
|
||||
ms.openlocfilehash: e99c1c1411b335837b478b32f085596ec4f5fc0f
|
||||
ms.sourcegitcommit: 46eac8c63f52669996a9c832f2abf04864dc89ba
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/18/2022
|
||||
ms.locfileid: '148172907'
|
||||
---
|
||||
If you create a new clone of the repository, you won't lose any of your Git history or changes when you split a folder into a separate repository.
|
||||
如果您创建仓库的新克隆副本,则将文件夹拆分为单独的仓库时不会丢失任何 Git 历史记录或更改。
|
||||
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
|
||||
2. Change the current working directory to the location where you want to create your new repository.
|
||||
2. 将当前工作目录更改为您要创建新仓库的位置。
|
||||
|
||||
4. Clone the repository that contains the subfolder.
|
||||
4. 克隆包含该子文件夹的仓库。
|
||||
```shell
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME
|
||||
```
|
||||
|
||||
4. Change the current working directory to your cloned repository.
|
||||
4. 将当前工作目录更改为您克隆的仓库。
|
||||
```shell
|
||||
$ cd REPOSITORY-NAME
|
||||
```
|
||||
|
||||
5. To filter out the subfolder from the rest of the files in the repository, install [`git-filter-repo`](https://github.com/newren/git-filter-repo), then run `git filter-repo` with the following arguments.
|
||||
- `FOLDER-NAME`: The folder within your project where you'd like to create a separate repository.
|
||||
5. 若要从存储库中的其余文件中筛选出子文件夹,请安装 [`git-filter-repo`](https://github.com/newren/git-filter-repo),然后使用以下参数运行 `git filter-repo`。
|
||||
- `FOLDER-NAME`:项目中要在其中创建单独存储库的文件夹。
|
||||
|
||||
{% windows %}
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** Windows users should use `/` to delimit folders.
|
||||
提示:Windows 用户应使用 `/` 来分隔文件夹。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
@@ -50,33 +56,33 @@ If you create a new clone of the repository, you won't lose any of your Git hist
|
||||
> Ref 'refs/heads/BRANCH-NAME' was rewritten
|
||||
```
|
||||
|
||||
The repository should now only contain the files that were in your subfolder(s).
|
||||
现在,该仓库应仅包含您的子文件夹中的文件。
|
||||
|
||||
6. [Create a new repository](/articles/creating-a-new-repository/) on {% data variables.product.product_name %}.
|
||||
6. 在 {% data variables.product.product_name %} 上[新建存储库](/articles/creating-a-new-repository/)。
|
||||
|
||||
7. At the top of your new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}'s Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL.
|
||||
|
||||

|
||||
7. 在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} 的快速设置页面上的新存储库顶部,单击 {% octicon "clippy" aria-label="The copy to clipboard icon" %} 以复制远程存储库 URL。
|
||||
|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** For information on the difference between HTTPS and SSH URLs, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)."
|
||||
提示:有关 HTTPS 和 SSH URL 之间区别的信息,请参阅“[关于远程存储库](/github/getting-started-with-github/about-remote-repositories)”。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
8. Check the existing remote name for your repository. For example, `origin` or `upstream` are two common choices.
|
||||
8. 检查仓库现有的远程名称。 例如,`origin` 或 `upstream` 是两个常见的选项。
|
||||
```shell
|
||||
$ git remote -v
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME.git (fetch)
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY-NAME.git (push)
|
||||
```
|
||||
|
||||
9. Set up a new remote URL for your new repository using the existing remote name and the remote repository URL you copied in step 7.
|
||||
9. 使用现有的远程名称和您在步骤 7 中复制的远程仓库 URL 为新仓库设置新的远程 URL。
|
||||
```shell
|
||||
git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git
|
||||
```
|
||||
|
||||
10. Verify that the remote URL has changed with your new repository name.
|
||||
10. 使用新仓库名称验证远程 URL 是否已更改。
|
||||
```shell
|
||||
$ git remote -v
|
||||
# Verify new remote URL
|
||||
@@ -84,7 +90,7 @@ If you create a new clone of the repository, you won't lose any of your Git hist
|
||||
> origin https://{% data variables.command_line.codeblock %}/USERNAME/NEW-REPOSITORY-NAME.git (push)
|
||||
```
|
||||
|
||||
11. Push your changes to the new repository on {% data variables.product.product_name %}.
|
||||
11. 将您的更改推送到 {% data variables.product.product_name %} 上的新仓库。
|
||||
```shell
|
||||
git push -u origin BRANCH-NAME
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: '从 {% data variables.product.prodname_projects_v1 %} 中迁移'
|
||||
intro: '可以将 {% data variables.projects.projects_v1_board %} 迁移到新的 {% data variables.product.prodname_projects_v2 %} 体验。'
|
||||
title: 'Migrating from {% data variables.product.prodname_projects_v1 %}'
|
||||
intro: 'You can migrate your {% data variables.projects.projects_v1_board %} to the new {% data variables.product.prodname_projects_v2 %} experience.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
feature: projects-v2
|
||||
@@ -10,53 +10,57 @@ type: tutorial
|
||||
topics:
|
||||
- Projects
|
||||
allowTitleToDifferFromFilename: true
|
||||
ms.openlocfilehash: 2efe16be4b865e4315bce1fee633c313a3d7e512
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148108703'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**注意:**
|
||||
|
||||
- 如果你要迁移的项目包含超过 1200 个项,则未结的问题将优先,接着是未解决的拉取请求,然后是注释。 剩余的空间将用于已解决的问题、已合并的请求拉取和已解决的拉取请求。 由于此限制而无法迁移的项将被移动到存档。 如果达到 10,000 个项的存档限制,则不会迁移其他项。
|
||||
- 注释卡被转换为草稿问题,内容被保存到草稿问题的正文中。 如果信息出现缺失,请使任何隐藏的字段可见。 有关详细信息,请参阅“[显示和隐藏字段](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view#showing-and-hiding-fields)”。
|
||||
- 不会迁移自动化。
|
||||
- 不会迁移会审、存档和活动。
|
||||
- 迁移后,新迁移的项目和旧项目不会保持同步。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## 关于项目迁移
|
||||
|
||||
可以将项目板迁移到新的 {% data variables.product.prodname_projects_v2 %} 体验,并试用表格、多个视图、新的自动化选项和强大的字段类型。 有关详细信息,请参阅“[关于项目](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects)”。
|
||||
|
||||
## 迁移组织项目板
|
||||
|
||||
{% data reusables.projects.enable-migration %} {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.organization-wide-project %}
|
||||
1. 在左侧,单击“Projects (经典)”。
|
||||
 {% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## 迁移用户项目板
|
||||
|
||||
{% data reusables.projects.enable-migration %} {% data reusables.profile.access_profile %}
|
||||
1. 在个人资料页面顶部的主导航栏中,单击 {% octicon "project" aria-label="The project board icon" %}“项目”。
|
||||

|
||||
1. 在项目列表上方,单击“Projects (经典)”。
|
||||
 {% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## 迁移存储库项目板
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:{% data variables.projects.projects_v2_caps %} 不支持存储库级别的项目。 当你迁移存储库项目板时,它将迁移到拥有存储库项目的组织或个人帐户,并且迁移的项目将被固定到原始存储库。
|
||||
**Notes:**
|
||||
|
||||
- If the project you are migrating contains more than {% data variables.projects.item_limit %} items, open issues will be prioritized followed by open pull requests and then notes. Remaining space will be used for closed issues, merged pull requested, and closed pull requests. Items that cannot be migrated due to this limit will be moved to the archive. If the archive limit of {% data variables.projects.archived_item_limit %} items is reached, additional items will not be migrated.
|
||||
- Note cards are converted to draft issues, and the contents are saved to the body of the draft issue. If information appears to be missing, make any hidden fields visible. For more information, see "[Showing and hiding fields](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view#showing-and-hiding-fields)."
|
||||
- Automation will not be migrated.
|
||||
- Triage, archive, and activity will not be migrated.
|
||||
- After migration, the new migrated project and old project will not be kept in sync.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.projects.enable-migration %} {% data reusables.repositories.navigate-to-repo %}
|
||||
1. 在存储库名称下,单击 {% octicon "project" aria-label="The project board icon" %}“项目”。
|
||||

|
||||
1. 单击“Projects (经典)”。
|
||||
 {% data reusables.projects.migrate-project-steps %}
|
||||
## About project migration
|
||||
|
||||
You can migrate your project boards to the new {% data variables.product.prodname_projects_v2 %} experience and try out tables, multiple views, new automation options, and powerful field types. For more information, see "[About projects](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects)."
|
||||
|
||||
## Migrating an organization project board
|
||||
|
||||
{% data reusables.projects.enable-migration %}
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.user-settings.access_org %}
|
||||
{% data reusables.organizations.organization-wide-project %}
|
||||
1. On the left, click **Projects (classic)**.
|
||||

|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## Migrating a user project board
|
||||
|
||||
{% data reusables.projects.enable-migration %}
|
||||
{% data reusables.profile.access_profile %}
|
||||
1. On the top of your profile page, in the main navigation, click {% octicon "table" aria-label="The project board icon" %} **Projects**.
|
||||

|
||||
1. Above the list of projects, click **Projects (classic)**.
|
||||

|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## Migrating a repository project board
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.projects.projects_v2_caps %} does not support repository level projects. When you migrate a repository project board, it will migrate to either the organization or personal account that owns the repository project, and the migrated project will be pinned to the original repository.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.projects.enable-migration %}
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
1. Under your repository name, click {% octicon "table" aria-label="The project board icon" %} **Projects**.
|
||||

|
||||
1. Click **Projects (classic)**.
|
||||

|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 查看文件
|
||||
intro: 可以查看原始文件内容或跟踪对文件中各行的更改,了解文件的各个部分如何随时间演变。
|
||||
title: Viewing a file
|
||||
intro: You can view raw file content or trace changes to lines in a file and discover how parts of the file evolved over time.
|
||||
redirect_from:
|
||||
- /articles/using-git-blame-to-trace-changes-in-a-file
|
||||
- /articles/tracing-changes-in-a-file
|
||||
@@ -16,54 +16,48 @@ versions:
|
||||
topics:
|
||||
- Repositories
|
||||
shortTitle: View files and track file changes
|
||||
ms.openlocfilehash: bc27fc67cfd18eb20f8c612b81f4d6dd5da20913
|
||||
ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/10/2022
|
||||
ms.locfileid: '146680987'
|
||||
---
|
||||
## 查看或复制原始文件内容
|
||||
## Viewing or copying the raw file content
|
||||
|
||||
使用原始视图,可以查看或复制不带任何样式的文件原始内容。
|
||||
With the raw view, you can view or copy the raw content of a file without any styling.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
1. 单击要查看的文件。
|
||||
2. 在文件视图的右上角,单击“原始”。
|
||||

|
||||
3. (可选)若要复制原始文件内容,请在文件视图右上角单击“{% octicon "copy" aria-label="The copy icon" %}”。
|
||||
1. Click the file that you want to view.
|
||||
2. In the upper-right corner of the file view, click **Raw**.
|
||||

|
||||
3. Optionally, to copy the raw file content, in the upper-right corner of the file view, click **{% octicon "copy" aria-label="The copy icon" %}**.
|
||||
|
||||
## 查看文件的逐行修订历史记录
|
||||
## Viewing the line-by-line revision history for a file
|
||||
|
||||
使用追溯视图时,可以查看整个文件的逐行修订历史记录,也可以单击 {% octicon "versions" aria-label="The prior blame icon" %} 查看文件中某一行的修订历史记录。 每次单击 {% octicon "versions" aria-label="The prior blame icon" %} 后,将看到该行以前的修订信息,包括提交更改的人员和时间。
|
||||
With the blame view, you can view the line-by-line revision history for an entire file, or view the revision history of a single line within a file by clicking {% octicon "versions" aria-label="The prior blame icon" %}. Each time you click {% octicon "versions" aria-label="The prior blame icon" %}, you'll see the previous revision information for that line, including who committed the change and when.
|
||||
|
||||

|
||||

|
||||
|
||||
在文件或拉取请求中,还可以使用 {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %} 菜单查看所选行或行范围的 Git 追溯。
|
||||
In a file or pull request, you can also use the {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %} menu to view Git blame for a selected line or range of lines.
|
||||
|
||||

|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
提示:在命令行上,还可以使用 `git blame` 查看文件内各行的修订历史记录。 有关详细信息,请参阅 [Git 的 `git blame` 文档](https://git-scm.com/docs/git-blame)。
|
||||
**Tip:** On the command line, you can also use `git blame` to view the revision history of lines within a file. For more information, see [Git's `git blame` documentation](https://git-scm.com/docs/git-blame).
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. 单击以打开您想要查看其行历史记录的文件。
|
||||
3. 在文件视图的右上角,单击“追溯”以打开追溯视图。
|
||||

|
||||
4. 若要查看特定行的早期修订,或重新追溯,请单击 {% octicon "versions" aria-label="The prior blame icon" %},直至找到你想查看的更改。
|
||||

|
||||
2. Click to open the file whose line history you want to view.
|
||||
3. In the upper-right corner of the file view, click **Blame** to open the blame view.
|
||||

|
||||
4. To see earlier revisions of a specific line, or reblame, click {% octicon "versions" aria-label="The prior blame icon" %} until you've found the changes you're interested in viewing.
|
||||

|
||||
|
||||
{% ifversion blame-ignore-revs %}
|
||||
|
||||
## 忽略追溯视图中的提交
|
||||
## Ignore commits in the blame view
|
||||
|
||||
`.git-blame-ignore-revs` 文件中指定的所有修订(必须位于存储库的根目录中)利用 Git 的 `git blame --ignore-revs-file` 配置设置从追溯视图中隐藏。 有关详细信息,请参阅 Git 文档中的 [`git blame --ignore-revs-file`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt)。
|
||||
All revisions specified in the `.git-blame-ignore-revs` file, which must be in the root directory of your repository, are hidden from the blame view using Git's `git blame --ignore-revs-file` configuration setting. For more information, see [`git blame --ignore-revs-file`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt) in the Git documentation.
|
||||
|
||||
1. 在存储库的根目录中,创建一个名为 `.git-blame-ignore-revs` 的文件。
|
||||
2. 在该文件中添加要从追溯视图中排除的提交哈希。 建议按如下所示构建文件(包括评论):
|
||||
1. In the root directory of your repository, create a file named `.git-blame-ignore-revs`.
|
||||
2. Add the commit hashes you want to exclude from the blame view to that file. We recommend the file to be structured as follows, including comments:
|
||||
|
||||
```ini
|
||||
# .git-blame-ignore-revs
|
||||
@@ -73,22 +67,26 @@ ms.locfileid: '146680987'
|
||||
69d029cec8337c616552756310748c4a507bd75a
|
||||
```
|
||||
|
||||
3. 提交并推送更改。
|
||||
3. Commit and push the changes.
|
||||
|
||||
现在,访问追溯视图时,追溯中将不会包含列出的修订。 你会看到“忽略 .git-blame-ignore-revs 中的修订”横幅,表明某些提交可能已隐藏:
|
||||
Now when you visit the blame view, the listed revisions will not be included in the blame. You'll see an **Ignoring revisions in .git-blame-ignore-revs** banner indicating that some commits may be hidden:
|
||||
|
||||

|
||||

|
||||
|
||||
当一些提交对代码进行大量更改时,这非常有用。 也可以在本地运行 `git blame` 时使用该文件:
|
||||
This can be useful when a few commits make extensive changes to your code. You can use the file when running `git blame` locally as well:
|
||||
|
||||
```shell
|
||||
git blame --ignore-revs-file .git-blame-ignore-revs
|
||||
```
|
||||
|
||||
还可以配置本地 git,使其始终忽略该文件中的修订:
|
||||
You can also configure your local git so it always ignores the revs in that file:
|
||||
|
||||
```shell
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Bypassing `.git-blame-ignore-revs` in the blame view
|
||||
|
||||
If the blame view for a file shows **Ignoring revisions in .git-blame-ignore-revs**, you can still bypass `.git-blame-ignore-revs` and see the normal blame view. In the URL, append a `~` to the SHA and the **Ignoring revisions in .git-blame-ignore-revs** will disappear.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
ms.openlocfilehash: 1a9ef3b5c648f6cbc07e2c22dbb360163c28bd0d
|
||||
ms.sourcegitcommit: 82b1242de02ecc4bdec02a5b6d11568fb2deb1aa
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: "148179837"
|
||||
---
|
||||
1. 单击“更新作业”。
|
||||

|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: ea90a8f3dc173dba123032b4555f4d7df19d63bd
|
||||
ms.sourcegitcommit: 2ff4a43f0b14939da79d56c54402cfee8d90ae23
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/17/2022
|
||||
ms.locfileid: "148169563"
|
||||
---
|
||||
1. 在边栏的“安全性”部分中,单击“{% octicon "checklist" aria-label="The checklist icon" %} 合规性”。
|
||||
@@ -1,10 +1,2 @@
|
||||
---
|
||||
ms.openlocfilehash: 55a01fbe1358fc0fffc11f146b973d79242c5235
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: "148108659"
|
||||
---
|
||||
1. 在组织名称下,单击 {% octicon "project" aria-label="The Projects icon" %}“项目”。
|
||||
{% ifversion fpt or ghes or ghec %}{% else %}{% endif %}
|
||||
1. Under your organization name, click {% ifversion projects-v2 %}{% octicon "table" aria-label="The Projects icon" %}{% else %}{% octicon "project" aria-label="The Projects icon" %}{% endif %} **Projects**.
|
||||
{% ifversion projects-v2 %}{% else %}{% endif %}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
ms.openlocfilehash: cd91a98e6cb0da73a24f7f6e682b67ec25b406d4
|
||||
ms.sourcegitcommit: 24427fe609677b2c58137b1d9d63869d0872daf4
|
||||
ms.openlocfilehash: 7843dd2811e3645b6c9ea979fd3cb54a14b151f0
|
||||
ms.sourcegitcommit: 8d6f272d8b5da44e3a29ad8d99013c10a5c91b35
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/04/2022
|
||||
ms.locfileid: "148134790"
|
||||
ms.lasthandoff: 11/17/2022
|
||||
ms.locfileid: "148172034"
|
||||
---
|
||||
Partner | 支持的密钥
|
||||
--- | ---
|
||||
@@ -23,6 +23,8 @@ Azure | Azure CosmosDB 可识别密钥
|
||||
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %}
|
||||
Azure | Azure ML 工作室(经典)Web 服务密钥
|
||||
Azure | Azure SAS 令牌
|
||||
Azure | Azure 搜索管理密钥
|
||||
Azure | Azure 搜索查询密钥
|
||||
Azure | Azure 服务管理证书
|
||||
Azure | Azure SQL 连接字符串
|
||||
Azure | Azure 存储帐户密钥
|
||||
|
||||
Reference in New Issue
Block a user