Merge pull request #95 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot 2020-10-02 01:35:57 -07:00 коммит произвёл GitHub
Родитель f9c2a6ee4c abb0abee7f
Коммит 9e29f09909
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
109 изменённых файлов: 291 добавлений и 383 удалений

Двоичные данные
assets/images/help/branch/branch-rename-edit.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 130 KiB

Двоичные данные
assets/images/help/branch/branch-rename-rename.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 62 KiB

Двоичные данные
assets/images/help/branch/branch-rename-type.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 61 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичные данные
assets/images/help/repository/code-scanning-actions-list.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 42 KiB

Двоичные данные
assets/images/help/repository/code-scanning-alerts-found-link.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 55 KiB

Двоичные данные
assets/images/help/repository/code-scanning-branch-dropdown.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 64 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 109 KiB

Двоичные данные
assets/images/help/repository/code-scanning-missing-analysis.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 119 KiB

Двоичные данные
assets/images/help/repository/code-scanning-pr-checks.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 191 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 6.2 KiB

После

Ширина:  |  Высота:  |  Размер: 41 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 59 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 125 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 76 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 47 KiB

Двоичный файл не отображается.

Просмотреть файл

@ -82,7 +82,7 @@ This section explains how you can use release management to distribute updates t
If you're developing an action for other people to use, we recommend using release management to control how you distribute updates. Users can expect an action's major version to include necessary critical fixes and security patches, while still remaining compatible with their existing workflows. You should consider releasing a new major version whenever your changes affect compatibility.
Under this release management approach, users should not be referencing an action's `master` branch, as it's likely to contain the latest code and consequently might be unstable. Instead, you can recommend that your users specify a major version when using your action, and only direct them to a more specific version if they encounter issues.
Under this release management approach, users should not be referencing an action's default branch, as it's likely to contain the latest code and consequently might be unstable. Instead, you can recommend that your users specify a major version when using your action, and only direct them to a more specific version if they encounter issues.
To use a specific action version, users can configure their {% data variables.product.prodname_actions %} workflow to target a tag, a commit's SHA, or a branch named for a release.

Просмотреть файл

@ -77,9 +77,9 @@ This file defines the `who-to-greet` input and `time` output. It also tells the
The actions toolkit is a collection of Node.js packages that allow you to quickly build JavaScript actions with more consistency.
The toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/master/packages/core) package provides an interface to the workflow commands, input and output variables, exit statuses, and debug messages.
The toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package provides an interface to the workflow commands, input and output variables, exit statuses, and debug messages.
The toolkit also offers a [`@actions/github`](https://github.com/actions/toolkit/tree/master/packages/github) package that returns an authenticated Octokit REST client and access to GitHub Actions contexts.
The toolkit also offers a [`@actions/github`](https://github.com/actions/toolkit/tree/main/packages/github) package that returns an authenticated Octokit REST client and access to GitHub Actions contexts.
The toolkit offers more than the `core` and `github` packages. For more information, see the [actions/toolkit](https://github.com/actions/toolkit) repository.
@ -119,7 +119,7 @@ try {
}
```
If an error is thrown in the above `index.js` example, `core.setFailed(error.message);` uses the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/master/packages/core) package to log a message and set a failing exit code. For more information, see "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)."
If an error is thrown in the above `index.js` example, `core.setFailed(error.message);` uses the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package to log a message and set a failing exit code. For more information, see "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)."
### Creating a README

Просмотреть файл

@ -24,7 +24,7 @@ Nonzero value | `failure` | Any other exit code indicates the action failed. Whe
### Setting a failure exit code in a JavaScript action
If you are creating a JavaScript action, you can use the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/master/packages/core) package to log a message and set a failure exit code. For example:
If you are creating a JavaScript action, you can use the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package to log a message and set a failure exit code. For example:
```javascript
try {

Просмотреть файл

@ -43,7 +43,7 @@ For a definition of common terms, see "[Core concepts for {% data variables.prod
{% data variables.product.product_name %} offers CI workflow templates for a variety of languages and frameworks.
Browse the complete list of CI workflow templates offered by {% data variables.product.product_name %} in the {% if currentVersion == "free-pro-team@latest" %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/master/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}.
Browse the complete list of CI workflow templates offered by {% data variables.product.product_name %} in the {% if currentVersion == "free-pro-team@latest" %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}.
### Notifications for workflow runs

Просмотреть файл

@ -36,7 +36,7 @@ In addition to uploading packaging artifacts for testing in a continuous integra
* **Publish packages to {% data variables.product.prodname_registry %}**
{% data variables.product.prodname_registry %} can act as a package hosting service for many types of packages. You can choose to share your packages with all of {% data variables.product.prodname_dotcom %}, or private packages to share with collaborators or an organization. For more information, see "[About {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages/about-github-packages)."
You may want to publish packages to {% data variables.product.prodname_registry %} on every push into the master branch. This will allow developers on your project to always be able to run and test the latest build out of master easily, by installing it from {% data variables.product.prodname_registry %}.
You may want to publish packages to {% data variables.product.prodname_registry %} on every push into the default branch. This will allow developers on your project to always be able to run and test the latest build out of master easily, by installing it from {% data variables.product.prodname_registry %}.
* **Publish packages to a package registry**
For many projects, publishing to a package registry is performed whenever a new version of a project is released. For example, a project that produces a JAR file may upload new releases to the Maven Central repository. Or, a .NET project may produce a nuget package and upload it to the NuGet Gallery.

Просмотреть файл

@ -30,7 +30,7 @@ We recommend that you have a basic understanding of Java and the Ant framework.
### Starting with an Ant workflow template
{% data variables.product.prodname_dotcom %} provides an Ant workflow template that will work for most Ant-based Java projects. For more information, see the [Ant workflow template](https://github.com/actions/starter-workflows/blob/master/ci/ant.yml).
{% data variables.product.prodname_dotcom %} provides an Ant workflow template that will work for most Ant-based Java projects. For more information, see the [Ant workflow template](https://github.com/actions/starter-workflows/blob/main/ci/ant.yml).
To get started quickly, you can choose the preconfigured Ant template when you create a new workflow. For more information, see the "[{% data variables.product.prodname_actions %} quickstart](/actions/quickstart)."

Просмотреть файл

@ -30,7 +30,7 @@ We recommend that you have a basic understanding of Java and the Gradle framewor
### Starting with a Gradle workflow template
{% data variables.product.prodname_dotcom %} provides a Gradle workflow template that will work for most Gradle-based Java projects. For more information, see the [Gradle workflow template](https://github.com/actions/starter-workflows/blob/master/ci/gradle.yml).
{% data variables.product.prodname_dotcom %} provides a Gradle workflow template that will work for most Gradle-based Java projects. For more information, see the [Gradle workflow template](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml).
To get started quickly, you can choose the preconfigured Gradle template when you create a new workflow. For more information, see the "[{% data variables.product.prodname_actions %} quickstart](/actions/quickstart)."

Просмотреть файл

@ -30,7 +30,7 @@ We recommend that you have a basic understanding of Java and the Maven framework
### Starting with a Maven workflow template
{% data variables.product.prodname_dotcom %} provides a Maven workflow template that will work for most Maven-based Java projects. For more information, see the [Maven workflow template](https://github.com/actions/starter-workflows/blob/master/ci/maven.yml).
{% data variables.product.prodname_dotcom %} provides a Maven workflow template that will work for most Maven-based Java projects. For more information, see the [Maven workflow template](https://github.com/actions/starter-workflows/blob/main/ci/maven.yml).
To get started quickly, you can choose the preconfigured Maven template when you create a new workflow. For more information, see the "[{% data variables.product.prodname_actions %} quickstart](/actions/quickstart)."

Просмотреть файл

@ -28,7 +28,7 @@ We recommend that you have a basic understanding of Node.js, YAML, workflow conf
### Starting with the Node.js workflow template
{% data variables.product.prodname_dotcom %} provides a Node.js workflow template that will work for most Node.js projects. This guide includes npm and Yarn examples that you can use to customize the template. For more information, see the [Node.js workflow template](https://github.com/actions/starter-workflows/blob/master/ci/node.js.yml).
{% data variables.product.prodname_dotcom %} provides a Node.js workflow template that will work for most Node.js projects. This guide includes npm and Yarn examples that you can use to customize the template. For more information, see the [Node.js workflow template](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml).
To get started quickly, add the template to the `.github/workflows` directory of your repository.

Просмотреть файл

@ -31,7 +31,7 @@ We recommend that you have a basic understanding of Python, PyPy, and pip. For m
### Starting with the Python workflow template
{% data variables.product.prodname_dotcom %} provides a Python workflow template that should work for most Python projects. This guide includes examples that you can use to customize the template. For more information, see the [Python workflow template](https://github.com/actions/starter-workflows/blob/master/ci/python-package.yml).
{% data variables.product.prodname_dotcom %} provides a Python workflow template that should work for most Python projects. This guide includes examples that you can use to customize the template. For more information, see the [Python workflow template](https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml).
To get started quickly, add the template to the `.github/workflows` directory of your repository.
@ -230,7 +230,7 @@ steps:
You can cache pip dependencies using a unique key, and restore the dependencies when you run future workflows using the [`cache`](https://github.com/marketplace/actions/cache) action. For more information, see "[Caching dependencies to speed up workflows](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)."
Pip caches dependencies in different locations, depending on the operating system of the runner. The path you'll need to cache may differ from the Ubuntu example below depending on the operating system you use. For more information, see [Python caching examples](https://github.com/actions/cache/blob/master/examples.md#python---pip).
Pip caches dependencies in different locations, depending on the operating system of the runner. The path you'll need to cache may differ from the Ubuntu example below depending on the operating system you use. For more information, see [Python caching examples](https://github.com/actions/cache/blob/main/examples.md#python---pip).
{% raw %}
```yaml
@ -424,4 +424,4 @@ jobs:
```
{% endraw %}
For more information about the template workflow, see [`python-publish`](https://github.com/actions/starter-workflows/blob/master/ci/python-publish.yml).
For more information about the template workflow, see [`python-publish`](https://github.com/actions/starter-workflows/blob/main/ci/python-publish.yml).

Просмотреть файл

@ -36,9 +36,9 @@ Artifacts and caching are similar because they provide the ability to store file
With `v2` of the `cache` action, you can access the cache in workflows triggered by any event that has a `GITHUB_REF`. If you are using `v1` of the `cache` action, you can only access the cache in workflows triggered by `push` and `pull_request` events, except for the `pull_request` `closed` event. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
A workflow can access and restore a cache created in the current branch, the base branch (including base branches of forked repositories), or the default branch (usually `master`). For example, a cache created on the default branch `master` would be accessible from any pull request. Also, if the branch `feature-b` has the base branch `feature-a`, a workflow triggered on `feature-b` would have access to caches created in the default branch (`master`), `feature-a`, and `feature-b`.
A workflow can access and restore a cache created in the current branch, the base branch (including base branches of forked repositories), or the default branch (usually `main`). For example, a cache created on the default branch would be accessible from any pull request. Also, if the branch `feature-b` has the base branch `feature-a`, a workflow triggered on `feature-b` would have access to caches created in the default branch (`main`), `feature-a`, and `feature-b`.
Access restrictions provide cache isolation and security by creating a logical boundary between different workflows and branches. For example, a cache created for the branch `feature-a` (with the base `master`) would not be accessible to a pull request for the branch `feature-b` (with the base `master`).
Access restrictions provide cache isolation and security by creating a logical boundary between different workflows and branches. For example, a cache created for the branch `feature-a` (with the base `main`) would not be accessible to a pull request for the branch `feature-b` (with the base `main`).
### Using the `cache` action
@ -178,14 +178,14 @@ restore-keys: |
npm-
```
For example, if a pull request contains a `feature` branch (the current scope) and targets the default branch (`master`), the action searches for `key` and `restore-keys` in the following order:
For example, if a pull request contains a `feature` branch (the current scope) and targets the default branch (`main`), the action searches for `key` and `restore-keys` in the following order:
1. Key `npm-feature-d5ea0750` in the `feature` branch scope
1. Key `npm-feature-` in the `feature` branch scope
2. Key `npm-` in the `feature` branch scope
1. Key `npm-feature-d5ea0750` in the `master` branch scope
3. Key `npm-d5ea0750` in the `master` branch scope
4. Key `npm` in the `master` branch scope
1. Key `npm-feature-d5ea0750` in the `main` branch scope
3. Key `npm-d5ea0750` in the `main` branch scope
4. Key `npm` in the `main` branch scope
### Usage limits and eviction policy

Просмотреть файл

@ -152,7 +152,7 @@ jobs:
uses: docker://alpine:3.8
```
For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/master/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)."
For some examples of Docker actions, see the [Docker-image.yml workflow](https://github.com/actions/starter-workflows/blob/main/ci/docker-image.yml) and "[Creating a Docker container action](/articles/creating-a-docker-container-action)."
### Next steps

Просмотреть файл

@ -28,7 +28,7 @@ To help prevent accidental disclosure, {% data variables.product.product_name %}
- **Never use structured data as a secret**
- Unstructured data can cause secret redaction within logs to fail, because redaction largely relies on finding an exact match for the specific secret value. For example, do not use a blob of JSON, XML, or YAML (or similar) to encapsulate a secret value, as this significantly reduces the probability the secrets will be properly redacted. Instead, create individual secrets for each sensitive value.
- **Register all secrets used within workflows**
- If a secret is used to generate another sensitive value within a workflow, that generated value should be formally [registered as a secret](https://github.com/actions/toolkit/tree/master/packages/core#setting-a-secret), so that it will be redacted if it ever appears in the logs. For example, if using a private key to generate a signed JWT to access a web API, be sure to register that JWT as a secret or else it wont be redacted if it ever enters the log output.
- If a secret is used to generate another sensitive value within a workflow, that generated value should be formally [registered as a secret](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret), so that it will be redacted if it ever appears in the logs. For example, if using a private key to generate a signed JWT to access a web API, be sure to register that JWT as a secret or else it wont be redacted if it ever enters the log output.
- Registering secrets applies to any sort of transformation/encoding as well. If your secret is transformed in some way (such as Base64 or URL-encoded), be sure to register the new value as a secret too.
- **Audit how secrets are handled**
- Audit how secrets are used, to help ensure theyre being handled as expected. You can do this by reviewing the source code of the repository executing the workflow, and checking any actions used in the workflow. For example, check that theyre not sent to unintended hosts, or explicitly being printed to log output.

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Disabling and enabling a workflow
intro: You can temporarily disable and re-enable an individual workflow on {% data variables.product.prodname_dotcom %}.
intro: You can disable and re-enable a workflow using {% data variables.product.prodname_dotcom %} or the REST API.
product: '{% data reusables.gated-features.actions %}'
versions:
free-pro-team: '*'
@ -10,7 +10,7 @@ versions:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. You can easily re-enable the workflow again on {% data variables.product.prodname_dotcom %}.
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. You can easily re-enable the workflow again on {% data variables.product.prodname_dotcom %}. You can also disable and enable a workflow using the REST API. For more information, see the "[Actions REST API](/rest/reference/actions#workflows)."
Temporarily disabling a workflow can be useful in many scenarios. These are a few examples where disabling a workflow might be helpful:

Просмотреть файл

@ -57,12 +57,12 @@ Workflow logs list the runner used to run a job. For more information, see "[Vie
The software tools included in {% data variables.product.prodname_dotcom %}-hosted runners are updated weekly. For the latest list of included tools for each runner operating system, see the links below:
* [Ubuntu 20.04 LTS](https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu2004-README.md)
* [Ubuntu 18.04 LTS](https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md)
* [Ubuntu 16.04 LTS](https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1604-README.md)
* [Windows Server 2019](https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md)
* [Windows Server 2016](https://github.com/actions/virtual-environments/blob/master/images/win/Windows2016-Readme.md)
* [MacOS 10.15](https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md)
* [Ubuntu 20.04 LTS](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md)
* [Ubuntu 18.04 LTS](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md)
* [Ubuntu 16.04 LTS](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1604-README.md)
* [Windows Server 2019](https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md)
* [Windows Server 2016](https://github.com/actions/virtual-environments/blob/main/images/win/Windows2016-Readme.md)
* [MacOS 10.15](https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md)
{% data reusables.github-actions.ubuntu-runner-preview %}

Просмотреть файл

@ -60,8 +60,8 @@ on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on master branch
- master
# Push events on main branch
- main
# Push events to branches matching refs/heads/mona/octocat
- 'mona/octocat'
# Push events to branches matching refs/heads/releases/10
@ -443,7 +443,7 @@ The `my backup step` only runs when the previous step of a job fails. For more i
```yaml
steps:
- name: My first step
uses: monacorp/action-name@master
uses: monacorp/action-name@main
- name: My backup step
if: {% raw %}${{ failure() }}{% endraw %}
uses: actions/heroku@master
@ -460,7 +460,7 @@ Selects an action to run as part of a step in your job. An action is a reusable
We strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.
- Using the commit SHA of a released action version is the safest for stability and security.
- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.
- Using the `master` branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.
- Using the default branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.
Some actions require inputs that you must set using the [`with`](#jobsjob_idstepswith) keyword. Review the action's README file to determine the inputs required.
@ -477,7 +477,7 @@ steps:
# Reference a minor version of a release
- uses: actions/setup-node@v1.2
# Reference a branch
- uses: actions/setup-node@master
- uses: actions/setup-node@main
```
##### Example using a public action
@ -491,7 +491,7 @@ jobs:
my_first_job:
steps:
- name: My first step
# Uses the master branch of a public repository
# Uses the default branch of a public repository
uses: actions/heroku@master
- name: My second step
# Uses a specific version tag of a public repository
@ -509,7 +509,7 @@ jobs:
my_first_job:
steps:
- name: My first step
uses: actions/aws/ec2@master
uses: actions/aws/ec2@main
```
##### Example using action in the same repository as the workflow
@ -674,7 +674,7 @@ jobs:
my_first_job:
steps:
- name: My first step
uses: actions/hello_world@master
uses: actions/hello_world@main
with:
first_name: Mona
middle_name: The
@ -691,7 +691,7 @@ A `string` that defines the inputs for a Docker container. {% data variables.pro
```yaml
steps:
- name: Explain why this job ran
uses: monacorp/action-name@master
uses: monacorp/action-name@main
with:
entrypoint: /bin/echo
args: The ${{ github.event_name }} event triggered this step.
@ -713,7 +713,7 @@ Overrides the Docker `ENTRYPOINT` in the `Dockerfile`, or sets it if one wasn't
```yaml
steps:
- name: Run a custom command
uses: monacorp/action-name@master
uses: monacorp/action-name@main
with:
entrypoint: /a/different/executable
```
@ -1116,8 +1116,8 @@ For more information about branch, tag, and path filter syntax, see "[`on.<push|
|---------|------------------------|---------|
| `feature/*` | The `*` wildcard matches any character, but does not match slash (`/`). | -`feature/my-branch`<br/>-`feature/your-branch` |
| `feature/**` | The `**` wildcard matches any character including slash (`/`) in branch and tag names. | -`feature/beta-a/my-branch`<br/>-`feature/your-branch`<br/>-`feature/mona/the/octocat` |
| -`master`<br/>-`releases/mona-the-octcat` | Matches the exact name of a branch or tag name. | -`master`<br/>-`releases/mona-the-octocat` |
| `'*'` | Matches all branch and tag names that don't contain a slash (`/`). The `*` character is a special character in YAML. When you start a pattern with `*`, you must use quotes. | -`master`<br/>-`releases` |
| -`main`<br/>-`releases/mona-the-octcat` | Matches the exact name of a branch or tag name. | -`main`<br/>-`releases/mona-the-octocat` |
| `'*'` | Matches all branch and tag names that don't contain a slash (`/`). The `*` character is a special character in YAML. When you start a pattern with `*`, you must use quotes. | -`main`<br/>-`releases` |
| `'**'` | Matches all branch and tag names. This is the default behavior when you don't use a `branches` or `tags` filter. | -`all/the/branches`<br/>-`every/tag` |
| `'*feature'` | The `*` character is a special character in YAML. When you start a pattern with `*`, you must use quotes. | -`mona-feature`<br/>-`feature`<br/>-`ver-10-feature` |
| `v2*` | Matches branch and tag names that start with `v2`. | -`v2`<br/>-`v2.0`<br/>-`v2.9` |

Просмотреть файл

@ -17,7 +17,7 @@ versions:
### Configuring the first node
1. Connect to the node that will be designated as the `mysql-master` in `cluster.conf`. For more information, see “[About the cluster configuration file](/enterprise/{{ currentVersion }}/admin/guides/clustering/initializing-the-cluster/#about-the-cluster-configuration-file)."
1. Connect to the node that will be designated as MySQL primary in `cluster.conf`. For more information, see "[About the cluster configuration file](/enterprise/{{ currentVersion }}/admin/guides/clustering/initializing-the-cluster/#about-the-cluster-configuration-file)."
2. In your web browser, visit `https://<ip address>:8443/setup/`.
{% data reusables.enterprise_installation.upload-a-license-file %}
{% data reusables.enterprise_installation.save-settings-in-web-based-mgmt-console %}
@ -44,7 +44,7 @@ This example `cluster.conf` defines a cluster with five nodes.
The names of the nodes can be any valid hostname you choose. The names are set as the hostname of each node, and will also be added to `/etc/hosts` on each node, so that the nodes are locally resolvable to each other.
Specify the first cluster node you configured as the MySQL master via `mysql-server` and `mysql-master`.
Specify the first cluster node you configured as the MySQL primary via `mysql-server` and `mysql-master`.
```
[cluster]

Просмотреть файл

@ -183,7 +183,7 @@ You can test a pre-receive hook script locally before you create or update it on
$ git clone git@github.com:octocat/Hello-World.git
$ cd Hello-World
$ git remote add test git@127.0.0.1:test.git
$ GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 52311 -i ../id_rsa" git push -u test master
$ GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 52311 -i ../id_rsa" git push -u test main
> Warning: Permanently added '[192.168.99.100]:52311' (ECDSA) to the list of known hosts.
> Counting objects: 7, done.
> Delta compression using up to 4 threads.
@ -192,7 +192,7 @@ You can test a pre-receive hook script locally before you create or update it on
> Total 7 (delta 0), reused 7 (delta 0)
> remote: error: rejecting all pushes
> To git@192.168.99.100:test.git
> ! [remote rejected] master -> master (pre-receive hook declined)
> ! [remote rejected] main -> main (pre-receive hook declined)
> error: failed to push some refs to 'git@192.168.99.100:test.git'
```

Просмотреть файл

@ -34,5 +34,5 @@ Oct 26 01:42:08 github-ent github_audit: {:created_at=>1351215728326, :actor_ip=
This example shows that commits were pushed to a repository.
```
Oct 26 02:19:31 github-ent github_audit: { "pid":22860, "ppid":22859, "program":"receive-pack", "git_dir":"/data/repositories/some-user/some-repository.git", "hostname":"github-ent", "pusher":"some-user", "real_ip":"10.0.0.51", "user_agent":"git/1.7.10.4", "repo_id":1, "repo_name":"some-user/some-repository", "transaction_id":"b031b7dc7043c87323a75f7a92092ef1456e5fbaef995c68", "frontend_ppid":1, "repo_public":true, "user_name":"some-user", "user_login":"some-user", "frontend_pid":18238, "frontend":"github-ent", "user_email":"some-user@github.example.com", "user_id":2, "pgroup":"github-ent_22860", "status":"post_receive_hook", "features":" report-status side-band-64k", "received_objects":3, "receive_pack_size":243, "non_fast_forward":false, "current_ref":"refs/heads/master" }
Oct 26 02:19:31 github-ent github_audit: { "pid":22860, "ppid":22859, "program":"receive-pack", "git_dir":"/data/repositories/some-user/some-repository.git", "hostname":"github-ent", "pusher":"some-user", "real_ip":"10.0.0.51", "user_agent":"git/1.7.10.4", "repo_id":1, "repo_name":"some-user/some-repository", "transaction_id":"b031b7dc7043c87323a75f7a92092ef1456e5fbaef995c68", "frontend_ppid":1, "repo_public":true, "user_name":"some-user", "user_login":"some-user", "frontend_pid":18238, "frontend":"github-ent", "user_email":"some-user@github.example.com", "user_id":2, "pgroup":"github-ent_22860", "status":"post_receive_hook", "features":" report-status side-band-64k", "received_objects":3, "receive_pack_size":243, "non_fast_forward":false, "current_ref":"refs/heads/main" }
```

Просмотреть файл

@ -202,7 +202,7 @@ Key | Type | Description
`push_id` | `integer` | Unique identifier for the push.
`size`|`integer` | The number of commits in the push.
`distinct_size`|`integer` | The number of distinct commits in the push.
`ref`|`string` | The full [`git ref`](/v3/git/refs/) that was pushed. Example: `refs/heads/master`.
`ref`|`string` | The full [`git ref`](/v3/git/refs/) that was pushed. Example: `refs/heads/main`.
`head`|`string` | The SHA of the most recent commit on `ref` after the push.
`before`|`string` | The SHA of the most recent commit on `ref` before the push.
`commits`|`array` | An array of commit objects describing the pushed commits. (The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](/v3/repos/commits/) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries.)

Просмотреть файл

@ -967,7 +967,7 @@ Deliveries for `review_requested` and `review_request_removed` events will have
Key | Type | Description
----|------|-------------
`ref`|`string` | The full [`git ref`](/v3/git/refs/) that was pushed. Example: `refs/heads/master`.
`ref`|`string` | The full [`git ref`](/v3/git/refs/) that was pushed. Example: `refs/heads/main`.
`before`|`string` | The SHA of the most recent commit on `ref` before the push.
`after`|`string` | The SHA of the most recent commit on `ref` after the push.
`commits`|`array` | An array of commit objects describing the pushed commits. (The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](/v3/repos/commits/) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries.)

Просмотреть файл

@ -0,0 +1,58 @@
---
title: Changing the default branch
intro: 'If you have more than one branch in your repository, you can configure any branch as the default branch.'
permissions: People with admin permissions to a repository can change the default branch for the repository.
versions:
free-pro-team: '*'
enterprise-server: '*'
redirect_from:
- /github/administering-a-repository/setting-the-default-branch
- /articles/setting-the-default-branch
---
### About changing the default branch
You can choose the default branch for a repository. The default branch is the base branch for pull requests and code commits. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
{% note %}
**Note**: If you use the Git-Subversion bridge, setting a different default branch will affect your `trunk` branch contents and the `HEAD` you see when you list references for the remote repository. For more information, see "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients)" and [git-ls-remote](https://git-scm.com/docs/git-ls-remote.html) in the Git documentation.
{% endnote %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
{% data reusables.branches.set-default-branch %}
{% endif %}
### Prerequisites
To change the default branch, your repository must have more than one branch. For more information, see "[Creating and deleting branches within your repository](/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch)."
### Changing the default branch
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.repository-branches %}
1. Under "Default branch", to the right of the default branch name, click {% octicon "arrow-switch" aria-label="The switch icon with two arrows" %}.
![Switch icon with two arrows to the right of current default branch name](/assets/images/help/repository/repository-options-defaultbranch-change.png)
1. Use the drop-down, then click a branch name.
![Drop-down to choose new default branch](/assets/images/help/repository/repository-options-defaultbranch-drop-down.png)
1. Click **Update**.
!["Update" button after choosing a new default branch](/assets/images/help/repository/repository-options-defaultbranch-update.png)
1. Read the warning, then click **I understand, update the default branch.**
!["Update" button after choosing a new default branch](/assets/images/help/repository/repository-options-defaultbranch-i-understand.png)
{% else %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.repository-branches %}
4. In the default branch drop-down, choose the new default branch.
![Default branch dropdown selector](/assets/images/help/repository/repository-options-defaultbranch.png)
5. Click **Update**.
{% endif %}

Просмотреть файл

@ -41,8 +41,8 @@ versions:
{% link_in_list /restoring-a-deleted-repository %}
<!-- endif -->
{% topic_link_in_list /managing-branches-in-your-repository %}
{% link_in_list /setting-the-default-branch %}
{% link_in_list /viewing-branches-in-your-repository %}
{% link_in_list /changing-the-default-branch %}
{% link_in_list /deleting-and-restoring-branches-in-a-pull-request %}
{% topic_link_in_list /configuring-pull-request-merges %}
{% link_in_list /about-merge-methods-on-github %}

Просмотреть файл

@ -1,42 +0,0 @@
---
title: Setting the default branch
intro: 'If you have more than one branch in your repository, you can choose another branch to be the default branch.'
redirect_from:
- /articles/setting-the-default-branch
versions:
free-pro-team: '*'
enterprise-server: '*'
---
### About the default branch
{% data reusables.branches.new-repo-default-branch %} {% data reusables.branches.default-branch-automatically-base-branch %} If you have more than one branch in your repository, anyone with admin rights over a repository can select one of these existing branches as the default branch on the repository.
### Setting the default branch
{% note %}
**Note:** To set the default branch you must have more than one branch in your repository.
{% endnote %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.repository-branches %}
4. In the default branch drop-down, choose the new default branch.
![Default branch dropdown selector](/assets/images/help/repository/repository-options-defaultbranch.png)
5. Click **Update**.
You can only switch between branches that already exist on {% data variables.product.product_location %}. To create a new branch through the UI, see "[Creating and deleting branches within your repository](/articles/creating-and-deleting-branches-within-your-repository)".
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
You can also set the default branch name for any newly created repositories owned by your user account, organization, or enterprise account. For more information, see "[Managing the default branch for your repositories](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)", "[Managing the default branch name for repositories in your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization), or "[Enforcing a policy on the default branch name](/github/setting-up-and-managing-your-enterprise-account/enforcing-repository-management-policies-in-your-enterprise-account#enforcing-a-policy-on-the-default-branch-name)."
{% endif %}
{% warning %}
**Warning**: Setting a different default branch affects your `trunk` branch contents on the [Git-Subversion bridge](https://github.com/blog/1178-collaborating-on-github-with-subversion) and the `HEAD` you'd see when you `git ls-remote` this [repository's upstream URL](https://git-scm.com/docs/git-ls-remote.html).
{% endwarning %}

Просмотреть файл

@ -9,8 +9,8 @@ versions:
The error you receive may look like the following:
```shell
$ git push -u github.master
> fatal: 'github.master' does not appear to be a git repository
$ git push -u github.main
> fatal: 'github.main' does not appear to be a git repository
> fatal: The remote end hung up unexpectedly
$ git pull -u github

Просмотреть файл

@ -74,7 +74,7 @@ To illustrate how `git filter-branch` works, we'll show you how to remove your f
"git rm --cached --ignore-unmatch <em>PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA</em>" \
--prune-empty --tag-name-filter cat -- --all
> Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (266/266)
> Ref 'refs/heads/master' was rewritten
> Ref 'refs/heads/main' was rewritten
```
{% note %}
@ -89,7 +89,7 @@ To illustrate how `git filter-branch` works, we'll show you how to remove your f
$ echo "<em>YOUR-FILE-WITH-SENSITIVE-DATA</em>" >> .gitignore
$ git add .gitignore
$ git commit -m "Add <em>YOUR-FILE-WITH-SENSITIVE-DATA</em> to .gitignore"
> [master 051452f] Add <em>YOUR-FILE-WITH-SENSITIVE-DATA</em> to .gitignore
> [main 051452f] Add <em>YOUR-FILE-WITH-SENSITIVE-DATA</em> to .gitignore
> 1 files changed, 1 insertions(+), 0 deletions(-)
```
5. Double-check that you've removed everything you wanted to from your repository's history, and that all of your branches are checked out.
@ -102,7 +102,7 @@ To illustrate how `git filter-branch` works, we'll show you how to remove your f
> Writing objects: 100% (1058/1058), 148.85 KiB, done.
> Total 1058 (delta 590), reused 602 (delta 378)
> To https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/<em>YOUR-REPOSITORY</em>.git
> + 48dc599...051452f master -> master (forced update)
> + 48dc599...051452f main -> main (forced update)
```
7. In order to remove the sensitive file from [your tagged releases](/articles/about-releases), you'll also need to force-push against your Git tags:
```shell
@ -113,7 +113,7 @@ To illustrate how `git filter-branch` works, we'll show you how to remove your f
> Writing objects: 100% (321/321), 331.74 KiB | 0 bytes/s, done.
> Total 321 (delta 124), reused 269 (delta 108)
> To https://{% data variables.command_line.codeblock %}/<em>YOUR-USERNAME</em>/<em>YOUR-REPOSITORY</em>.git
> + 48dc599...051452f master -> master (forced update)
> + 48dc599...051452f main -> main (forced update)
```
8. Contact {% data variables.contact.contact_support %}, asking them to remove cached views and references to the sensitive data in pull requests on {% data variables.product.product_name %}.
9. Tell your collaborators to [rebase](https://git-scm.com/book/en/Git-Branching-Rebasing), *not* merge, any branches they created off of your old (tainted) repository history. One merge commit could reintroduce some or all of the tainted history that you just went to the trouble of purging.

Просмотреть файл

@ -32,7 +32,7 @@ versions:
9. Enter a commit message describing your changes.
![Issue template commit message field](/assets/images/help/repository/issue-template-commit-message-field.png)
10. Below the commit message fields, decide whether to commit your template directly to the default branch, or to create a new branch and open a pull request. For more information about pull requests, see "[About pull requests](/articles/about-pull-requests)."
![Issue template commit to master or open pull request choice](/assets/images/help/repository/issue-template-commit-to-master-or-open-pull-request.png)
![Issue template commit to main or open pull request choice](/assets/images/help/repository/issue-template-commit-to-master-or-open-pull-request.png)
11. Click **Commit changes**. Once these changes are merged into the default branch, the template will be available for contributors to use when they open new issues in the repository.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.19" %}

Просмотреть файл

@ -10,28 +10,30 @@ versions:
---
### Introducing branches
### About branches
Branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository.
You always create a branch from an existing branch. Typically, you might create a new branch from the default branch of your repository. You can then work on this new branch in isolation from changes that other people are making to the repository. A branch you create to build a feature is commonly referred to as a feature branch or topic branch. For more information, see "[Creating and deleting branches within your repository](/articles/creating-and-deleting-branches-within-your-repository/)."
You can also use a branch to publish a {% data variables.product.prodname_pages %} site. For more information, see "[What is {% data variables.product.prodname_dotcom %} Pages?](/articles/what-is-github-pages)"
You can also use a branch to publish a {% data variables.product.prodname_pages %} site. For more information, see "[About {% data variables.product.prodname_pages %}](/articles/what-is-github-pages)."
You must have write access to a repository to create a branch, open a pull request, or delete and restore branches in a pull request. For more information, see "[Access permissions on {% data variables.product.product_name %}](/articles/access-permissions-on-github)."
You must have write access to a repository to create a branch, open a pull request, or delete and restore branches in a pull request. For more information, see "[Access permissions on {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/access-permissions-on-github)."
### About the default branch
{% data reusables.branches.new-repo-default-branch %} The default branch is the branch that {% data variables.product.prodname_dotcom %} displays when anyone visits your repository. The default branch is also the initial branch that Git checks out locally out when someone clones the repository. {% data reusables.branches.default-branch-automatically-base-branch %}
By default, {% data variables.product.product_name %} names the default branch {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.23" %}`main`{% else %}`master`{% endif %} in any new repository.
{% data reusables.branches.change-default-branch %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
By default, the default branch name is `master`, but you can set the name to anything that makes sense for your workflow. For more information on the default branch name, see "[Managing the default branch name for your repositories](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)."
{% data reusables.branches.set-default-branch %}
{% endif %}
{% data reusables.branches.set-default-branch %}
### Working with branches
Once you're satisfied with your work, you can open a pull request to merge the changes in the current branch (the *head* branch) into another branch (the *base* branch). For more information, see "[About pull requests](/articles/about-pull-requests)."

Просмотреть файл

@ -18,7 +18,7 @@ You can specify which branch you'd like to merge your changes into when you crea
### Changing the branch range and destination repository
By default, pull requests are based on the parent repository's [default branch](/articles/setting-the-default-branch).
By default, pull requests are based on the parent repository's default branch. For more information, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
If the default parent repository isn't correct, you can change both the parent repository and the branch with the drop-down lists. You can also swap your head and base branches with the drop-down lists to establish diffs between reference points. References here must be branch names in your GitHub repository.

Просмотреть файл

@ -24,7 +24,7 @@ versions:
{% data reusables.pull_requests.automatically-delete-branches %}
If the branch you want to delete is the repository's default branch, you must choose a new default branch before deleting the branch. For more information, see "[Setting the default branch](/github/administering-a-repository/setting-the-default-branch)."
If the branch you want to delete is the repository's default branch, you must choose a new default branch before deleting the branch. For more information, see "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)."
If the branch you want to delete is associated with an open pull request, you must merge or close the pull request before deleting the branch. For more information, see "[Merging a pull request](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request)" or "[Closing a pull request](/github/collaborating-with-issues-and-pull-requests/closing-a-pull-request)."

Просмотреть файл

@ -11,7 +11,7 @@ versions:
2. Change the current working directory to your local project.
3. Check out the branch you wish to merge to. Usually, you will merge into the default branch.
```shell
$ git checkout <em>master</em>
$ git checkout <em>DEFAULT_BRANCH_NAME</em>
```
4. Pull the desired branch from the upstream repository. This method will retain the commit history without modification.
```shell
@ -22,5 +22,5 @@ versions:
7. Review the changes and ensure they are satisfactory.
8. Push the merge to your GitHub repository.
```shell
$ git push origin <em>master</em>
$ git push origin <em>DEFAULT_BRANCH_NAME</em>
```

Просмотреть файл

@ -83,8 +83,8 @@ For example, if you edited a file, such as *README.md*, and another person remov
2. Generate a list of the files affected by the merge conflict. In this example, the file *README.md* has a merge conflict.
```shell
$ git status
> # On branch master
> # Your branch and 'origin/master' have diverged,
> # On branch main
> # Your branch and 'origin/main' have diverged,
> # and have 1 and 2 different commits each, respectively.
> # (use "git pull" to merge the remote branch into yours)
> # You have unmerged paths.

Просмотреть файл

@ -21,7 +21,7 @@ Total 3 (delta 0), reused 0 (delta 0)
remote: always_reject.sh: failed with exit status 1
remote: error: rejecting all pushes
To https://54.204.174.51/hodor/nope.git
! [remote rejected] master -> master (pre-receive hook declined)
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://54.204.174.51/hodor/nope.git'
```

Просмотреть файл

@ -14,7 +14,7 @@ If your commit is not on the default branch, an indicator will show the branches
Once the commit is on the default branch, any tags that contain the commit will be shown and the default branch will be the only branch listed.
![Commit-master-label](/assets/images/help/commits/Commit-master-label.png)
![Commit-main-label](/assets/images/help/commits/Commit-master-label.png)
### Further reading

Просмотреть файл

@ -47,7 +47,7 @@ To learn more about other comparison options, see "[Three-dot and two-dot diff c
You can compare your base repository and any forked repository. This is the view that's presented when a user performs a Pull Request to a project.
To compare branches on different repositories, preface the branch names with user names. For example, by specifying `octocat:master` for `base` and `octo-org:master` for `compare`, you can compare the `master` branch of the repositories respectively owned by `octocat` and `octo-org`.
To compare branches on different repositories, preface the branch names with user names. For example, by specifying `octocat:main` for `base` and `octo-org:main` for `compare`, you can compare the `main` branch of the repositories respectively owned by `octocat` and `octo-org`.
Here's an example of a [comparison between two repositories](https://github.com/octocat/linguist/compare/master...octo-org:master).

Просмотреть файл

@ -23,7 +23,7 @@ $ git clone https://{% data variables.command_line.codeblock %}/<em>user</em>/<e
```
To fix the error, you'll need to be an administrator of the repository on {% data variables.product.product_location %}.
You'll want to [change the default branch](/articles/setting-the-default-branch) of the repository.
You'll want to [change the default branch](/github/administering-a-repository/changing-the-default-branch) of the repository.
After that, you can get a list of all the available branches from the command line:
@ -32,14 +32,14 @@ $ git branch -a
# Lists ALL the branches
> remotes/origin/awesome
> remotes/origin/more-work
> remotes/origin/new-master
> remotes/origin/new-main
```
Then, you can just switch to your new branch:
```shell
$ git checkout new-master
$ git checkout new-main
# Create and checkout a tracking branch
> Branch new-master set up to track remote branch new-master from origin.
> Switched to a new branch 'new-master'
> Branch new-main set up to track remote branch new-main from origin.
> Switched to a new branch 'new-main'
```

Просмотреть файл

@ -27,23 +27,91 @@ You decide how you generate {% data variables.product.prodname_code_scanning %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-security %}
3. To the right of "Code scanning", click **Set up code scanning**.
!["Set up code scanning" button to the right of "Code scanning" in the Security Overview](/assets/images/help/security/overview-set-up-code-scanning.png)
4. Under "Get started with code scanning", click **Set up this workflow** on the {% data variables.product.prodname_codeql_workflow %} or on a third-party workflow.
!["Set up this workflow" button under "Get started with code scanning" heading](/assets/images/help/repository/code-scanning-set-up-this-workflow.png)
5. Optionally, to customize how {% data variables.product.prodname_code_scanning %} scans your code, edit the workflow. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning)."
3. To the right of "{% data variables.product.prodname_code_scanning_capc %}", click **Set up {% data variables.product.prodname_code_scanning %}**.
!["Set up {% data variables.product.prodname_code_scanning %}" button to the right of "{% data variables.product.prodname_code_scanning_capc %}" in the Security Overview](/assets/images/help/security/overview-set-up-code-scanning.png)
4. Under "Get started with {% data variables.product.prodname_code_scanning %}", click **Set up this workflow** on the {% data variables.product.prodname_codeql_workflow %} or on a third-party workflow.
!["Set up this workflow" button under "Get started with {% data variables.product.prodname_code_scanning %}" heading](/assets/images/help/repository/code-scanning-set-up-this-workflow.png)
5. To customize how {% data variables.product.prodname_code_scanning %} scans your code, edit the workflow.
Generally you can commit the {% data variables.product.prodname_codeql_workflow %} without making any changes to it. However, many of the third-party workflows require additional configuration, so read the comments in the workflow before committing.
For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning)."
6. Use the **Start commit** drop-down, and type a commit message.
![Start commit](/assets/images/help/repository/start-commit-commit-new-file.png)
7. Choose whether you'd like to commit directly to the default branch, or create a new branch and start a pull request.
![Choose where to commit](/assets/images/help/repository/start-commit-choose-where-to-commit.png)
8. Click **Commit new file** or **Propose new file**.
After you commit the workflow file or create a pull request, {% data variables.product.prodname_code_scanning %} will analyze your code according to the frequency you specified in your workflow file. If you created a pull request, {% data variables.product.prodname_code_scanning %} will only analyze the code on the pull request's topic branch until you merge the pull request into the default branch of the repository.
In the default {% data variables.product.prodname_codeql_workflow %}, {% data variables.product.prodname_code_scanning %} is configured to analyze your code each time you either push a change to the default branch or any protected branches, or raise a pull request against the default branch or any protected branches. As a result, {% data variables.product.prodname_code_scanning %} will now commence.
### Viewing the logging output from {% data variables.product.prodname_code_scanning %}
After enabling {% data variables.product.prodname_code_scanning %} for your repository, you can watch the output of the actions as they run.
{% data reusables.repositories.actions-tab %}
You'll see a list that includes an entry for running the {% data variables.product.prodname_code_scanning %} workflow.
![Actions list showing {% data variables.product.prodname_code_scanning %} workflow](/assets/images/help/repository/code-scanning-actions-list.png)
1. Click the entry for the {% data variables.product.prodname_code_scanning %} workflow.
1. Click the job name on the left. For example, **Analyze (LANGUAGE)**.
![Log output from the {% data variables.product.prodname_code_scanning %} workflow](/assets/images/help/repository/code-scanning-logging-analyze-action.png)
1. Review the logging output from the actions in this workflow as they run.
1. Once all jobs are complete, you can view the details of any {% data variables.product.prodname_code_scanning %} alerts that were identified. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository#viewing-an-alert)."
{% note %}
**Note:** If you raised a pull request to add the {% data variables.product.prodname_code_scanning %} workflow to the repository, alerts from that pull request aren't displayed directly on the {% data variables.product.prodname_code_scanning_capc %} page until the pull request is merged. If any alerts were found you can view these, before the pull request is merged, by clicking the **_n_ alerts found** link in the banner on the {% data variables.product.prodname_code_scanning_capc %} page.
![Click the "n alerts found" link](/assets/images/help/repository/code-scanning-alerts-found-link.png)
{% endnote %}
### Understanding the pull request checks
Each {% data variables.product.prodname_code_scanning %} workflow you enable to run on pull requests always has at least two entries listed in the checks section of a pull request. There is one entry for each of the analysis jobs in the workflow, and a final one for the results of the analysis.
The names of the {% data variables.product.prodname_code_scanning %} analysis checks take the form: "TOOL NAME / JOB NAME (TRIGGER)." For example, for {% data variables.product.prodname_codeql %}, analysis of C++ code has the entry "{% data variables.product.prodname_codeql %} / Analyze (cpp) (pull_request)." You can click **Details** on a {% data variables.product.prodname_code_scanning %} analysis entry to see logging data. This allows you to debug a problem if the analysis job failed. For example, for {% data variables.product.prodname_code_scanning %} analysis of compiled languages, this can happen if the action can't build the code.
![{% data variables.product.prodname_code_scanning %} pull request checks](/assets/images/help/repository/code-scanning-pr-checks.png)
When the {% data variables.product.prodname_code_scanning %} jobs complete, {% data variables.product.prodname_dotcom %} works out whether any alerts were added by the pull request and adds the "{% data variables.product.prodname_code_scanning_capc %} results / TOOL NAME" entry to the list of checks. After {% data variables.product.prodname_code_scanning %} has been performed at least once, you can click **Details** to view the results of the analysis. If you used a pull request to add {% data variables.product.prodname_code_scanning %} to the repository, you will initially see a "Missing analysis" message when you click **Details** on the "{% data variables.product.prodname_code_scanning_capc %} results / TOOL NAME" check.
![Missing analysis for commit message](/assets/images/help/repository/code-scanning-missing-analysis.png)
#### Reasons for the "missing analysis" message
After {% data variables.product.prodname_code_scanning %} has analyzed the code in a pull request, it needs to compare the analysis of the topic branch (the branch you used to create the pull request) with the analysis of the base branch (the branch into which you want to merge the pull request). This allows {% data variables.product.prodname_code_scanning %} to compute which alerts are newly introduced by the pull request, which alerts were already present in the base branch, and whether any existing alerts are fixed by the changes in the pull request. Initially, if you use a pull request to add {% data variables.product.prodname_code_scanning %} to a repository, the base branch has not yet been analyzed, so it's not possible to compute these details. In this case, when you click through from the results check on the pull request you will see the "Missing analysis for base commit SHA-HASH" message.
There are other situations where there may be no analysis for the latest commit to the base branch for a pull request. These include:
* The pull request has been raised against a branch other than the default branch or a protected branch, and this branch hasn't been analyzed.
To check whether a branch has been scanned, go to the {% data variables.product.prodname_code_scanning_capc %} page, click the **Branch** drop-down and select the relevant branch.
![Choose a branch from the Branch drop-down menu](/assets/images/help/repository/code-scanning-branch-dropdown.png)
The solution in this situation is to add the name of the base branch to the `on:push` and `on:pull_request` specification in the {% data variables.product.prodname_code_scanning %} workflow on that branch and then make a change that updates the open pull request that you want to scan.
* The latest commit on the base branch for the pull request is currently being analyzed and analysis is not yet available.
Wait a few minutes and then push a change to the pull request to retrigger {% data variables.product.prodname_code_scanning %}.
* An error occurred while analyzing the latest commit on the base branch and analysis for that commit isn't available.
Merge a trivial change into the base branch to trigger {% data variables.product.prodname_code_scanning %} on this latest commit, then push a change to the pull request to retrigger {% data variables.product.prodname_code_scanning %}.
### Next steps
After you enable {% data variables.product.prodname_code_scanning %}, you can monitor analysis, view results, and further customize how you scan your code.
After enabling {% data variables.product.prodname_code_scanning %}, and allowing its actions to complete, you can:
- You can view the run status of {% data variables.product.prodname_code_scanning %} and get notifications for completed runs. For more information, see "[Managing a workflow run](/actions/configuring-and-managing-workflows/managing-a-workflow-run)" and "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-actions-notification-options)."
- After a scan completes, you can view alerts from a completed scan. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository)."
- You can customize how {% data variables.product.prodname_code_scanning %} scans the code in your repository. For more information, see "[Configuring code scanning](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning)."
- View all of the {% data variables.product.prodname_code_scanning %} alerts generated for this repository. For more information, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository)."
- View any alerts generated for a pull request submitted after you enabled {% data variables.product.prodname_code_scanning %}. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/github/finding-security-vulnerabilities-and-errors-in-your-code/triaging-code-scanning-alerts-in-pull-requests)."
- Set up notifications for completed runs. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-actions-notification-options)."
- Investigate any problems that occur with the initial setup of {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}. For more information, see "[Troubleshooting the {% data variables.product.prodname_codeql %} workflow](/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-the-codeql-workflow)."
- Customize how {% data variables.product.prodname_code_scanning %} scans the code in your repository. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning)."

Просмотреть файл

@ -49,7 +49,7 @@ versions:
```
9. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}.
```shell
$ git push -u origin master
$ git push -u origin main
# Pushes the changes in your local repository up to the remote repository you specified as the origin
```

Просмотреть файл

@ -47,7 +47,7 @@ Subversion checkouts are different: they mix the repository data in the working
You can also create branches using the Subversion bridge to GitHub.
From your svn client, make sure "master" is current by updating `trunk`:
From your svn client, make sure the default branch is current by updating `trunk`:
```shell
$ svn up trunk
> At revision 1.

Просмотреть файл

@ -35,9 +35,9 @@ Git projects are also stored within a single directory. However, Git obscures th
A Git workflow looks like this:
* A Git repository stores the full history of all of its branches and tags within the *.git* directory.
* The latest stable release is contained within the `master` branch.
* The latest stable release is contained within the default branch.
* Active feature work is developed in separate branches.
* When a feature is finished, the feature branch is merged into `master` and deleted.
* When a feature is finished, the feature branch is merged into the default branch and deleted.
Unlike SVN, with Git the directory structure remains the same, but the contents of the files change based on your branch.

Просмотреть файл

@ -20,19 +20,19 @@ versions:
When viewing a file on {% data variables.product.product_location %}, you usually see the version at the current head of a branch. For example:
* [https://github.com/github/hubot/blob/**master**/README.md](https://github.com/github/hubot/blob/master/README.md)
* [https://github.com/github/codeql/blob/**main**/README.md](https://github.com/github/codeql/blob/main/README.md)
refers to GitHub's `hubot` repository, and shows the `master` branch's current version of the `README.md` file.
refers to GitHub's `codeql` repository, and shows the `main` branch's current version of the `README.md` file.
The version of a file at the head of branch can change as new commits are made, so if you were to copy the normal URL, the file contents might not be the same when someone looks at it later.
### Press <kbd>y</kbd> to permalink to a file in a specific commit
For a permanent link to the specific version of a file that you see, instead of using a branch name in the URL (i.e. the `master` part in the example above), put a commit id. This will permanently link to the exact version of the file in that commit. For example:
For a permanent link to the specific version of a file that you see, instead of using a branch name in the URL (i.e. the `main` part in the example above), put a commit id. This will permanently link to the exact version of the file in that commit. For example:
* [https://github.com/github/hubot/blob/**ed25584f5ac2520a6c28547ffd0961c7abd7ea49**/README.md](https://github.com/github/hubot/blob/ed25584f5ac2520a6c28547ffd0961c7abd7ea49/README.md)
* [https://github.com/github/codeql/blob/**b212af08a6cffbb434f3c8a2795a579e092792fd**/README.md](https://github.com/github/codeql/blob/b212af08a6cffbb434f3c8a2795a579e092792fd/README.md)
replaces `master` with a specific commit id and the file content will not change.
replaces `main` with a specific commit id and the file content will not change.
Looking up the commit SHA by hand is inconvenient, however, so as a shortcut you can type <kbd>y</kbd> to automatically update the URL to the permalink version. Then you can copy the URL knowing that anyone you share it with will see exactly what you saw.

Просмотреть файл

@ -9,9 +9,9 @@ versions:
---
The interactive features of the notebook, such as custom JavaScript plots, will not work in your repository on {% data variables.product.product_location %}. For an example, see [*Linking and Interactions.ipynb*](https://github.com/bokeh/bokeh-notebooks/blob/master/tutorial/06%20-%20Linking%20and%20Interactions.ipynb).
The interactive features of the notebook, such as custom JavaScript plots, will not work in your repository on {% data variables.product.product_location %}. For an example, see [*Linking and Interactions.ipynb*](https://github.com/bokeh/bokeh-notebooks/blob/main/tutorial/06%20-%20Linking%20and%20Interactions.ipynb).
To view your Jupyter notebook with JavaScript content rendered or to share your notebook files with others you can use [nbviewer](https://nbviewer.jupyter.org/). For an example, see [*Linking and Interactions.ipynb*](https://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/tutorial/06%20-%20Linking%20and%20Interactions.ipynb) rendered on nbviewer.
To view your Jupyter notebook with JavaScript content rendered or to share your notebook files with others you can use [nbviewer](https://nbviewer.jupyter.org/). For an example, see [*Linking and Interactions.ipynb*](https://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/main/tutorial/06%20-%20Linking%20and%20Interactions.ipynb) rendered on nbviewer.
To view a fully interactive version of your Jupyter Notebook, you can set up a notebook server locally. For more information, see [Jupyter's official documentation](http://jupyter.readthedocs.io/en/latest/index.html).

Просмотреть файл

@ -47,7 +47,7 @@ If there are existing files in your repository that you'd like to use {% data va
5. Commit the file and push it to {% data variables.product.product_name %}:
```shell
$ git commit -m "add file.psd"
$ git push origin master
$ git push
```
You should see some diagnostic information about your file upload:
```shell

Просмотреть файл

@ -24,9 +24,9 @@ If you create an invalid URL using query parameters, or if you dont have the
Query parameter | Example
--- | ---
`body` | `https://github.com/octo-org/octo-repo/compare/master...pull-request-test?quick_pull=1&body=Fixes+the+problem.` creates a pull request, comparing the branches `master` and `pull-request-test`, with the comment "Fixes the problem" in the pull request body.
`body` | `https://github.com/octo-org/octo-repo/compare/main...pull-request-test?quick_pull=1&body=Fixes+the+problem.` creates a pull request, comparing the branches `main` and `pull-request-test`, with the comment "Fixes the problem" in the pull request body.
`title` | `https://github.com/octo-org/octo-repo/issues/new?labels=bug&title=New+bug+report` creates an issue with the label "bug" and title "New bug report."
`labels` | `https://github.com/octo-org/octo-repo/compare/master...pull-request-test?quick_pull=1&labels=bug` creates a pull request, comparing the branches `master` and `pull-request-test`, with the label "bug."
`labels` | `https://github.com/octo-org/octo-repo/compare/main...pull-request-test?quick_pull=1&labels=bug` creates a pull request, comparing the branches `main` and `pull-request-test`, with the label "bug."
`template` | `https://github.com/octo-org/octo-repo/issues/new?template=issue_template.md` creates an issue with a template in the issue body.
`milestone` | `https://github.com/octo-org/octo-repo/issues/new?milestone=testing+milestones` creates an issue with the milestone "testing milestones."
`assignees` | `https://github.com/octo-org/octo-repo/issues/new?assignees=octocat` creates an issue and assigns it to @octocat.

Просмотреть файл

@ -17,7 +17,7 @@ You can link an issue to a pull request {% if currentVersion == "free-pro-team@l
When you link a pull request to the issue the pull request addresses, collaborators can see that someone is working on the issue. {% if currentVersion ver_lt "enterprise-server@2.21" %}If the pull request and the issue are in different repositories, {% data variables.product.product_name %} will display the link after the pull request is merged, if the person who merges the pull request also has permission to close the issue.{% endif %}
When you merge a linked pull request into the default branch of a repository, its linked issue is automatically closed. For more information about the default branch, see "[Setting the default branch](/github/administering-a-repository/setting-the-default-branch)."
When you merge a linked pull request into the default branch of a repository, its linked issue is automatically closed. For more information about the default branch, see "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)."
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.20" %}
### Manually linking a pull request to an issue

Просмотреть файл

@ -25,5 +25,4 @@ For organizations that belong to an enterprise account, billing is managed at th
An entity, such as a company, non-profit, or group, can agree to the Standard Terms of Service or the Corporate Terms of Service for their organization. For more information, see "[Upgrading to the Corporate Terms of Service](/articles/upgrading-to-the-corporate-terms-of-service)."
{% data reusables.organizations.enter-data-protection-agreement %} For more information, see "[Entering a data protection agreement with {% data variables.product.prodname_dotcom %} for GDPR compliance](/articles/entering-a-data-protection-agreement-with-github-for-gdpr-compliance)."
{% endif %}

Просмотреть файл

@ -1,21 +0,0 @@
---
title: Entering a data protection agreement with GitHub for GDPR compliance
intro: '{% data reusables.organizations.enter-data-protection-agreement %}'
redirect_from:
- /articles/entering-a-data-protection-agreement-with-github-for-gdpr-compliance
versions:
free-pro-team: '*'
---
Your company, non-profit, group, or other entity must have agreed to the Corporate Terms of Service for your organization to enter a data protection agreement with {% data variables.product.product_name %}. For more information, see "[Upgrading to the Corporate Terms of Service](/articles/upgrading-to-the-corporate-terms-of-service)."
{% data reusables.profile.access_profile %}
{% data reusables.profile.access_org %}
{% data reusables.organizations.org_settings %}
4. Under "Data protection agreement", click **download and complete this form**.
![Data protection agreement section](/assets/images/help/organizations/data-protection-agreement.png)
5. Complete the form, making sure a signatory for your entity signs the form. A signatory is a person who is authorized to sign the agreement on behalf of the entity that agreed to the Corporate Terms of Service for your organization.
6. Email the form to {% data variables.contact.github_support %}.
### Further reading
- "[{% data variables.product.prodname_dotcom %} Corporate Terms of Service](/articles/github-corporate-terms-of-service/)"

Просмотреть файл

@ -131,7 +131,6 @@ versions:
<!-- endif -->
<!-- if currentVersion == "free-pro-team@latest" -->
{% link_in_list /upgrading-to-the-corporate-terms-of-service %}
{% link_in_list /entering-a-data-protection-agreement-with-github-for-gdpr-compliance %}
<!-- endif -->
{% topic_link_in_list /migrating-to-improved-organization-permissions %}
{% link_in_list /converting-an-owners-team-to-improved-organization-permissions %}

Просмотреть файл

@ -1,18 +1,17 @@
---
title: Managing the default branch name for repositories in your organization
intro: You can set the default branch name for repositories that members create in your organization.
intro: 'You can set the default branch name for repositories that members create in your organization on {% data variables.product.product_location %}.'
permissions: Organization owners can manage the default branch name for new repositories in the organization.
versions:
free-pro-team: '*'
enterprise-server: '>=2.23'
---
### About the default branch name
### About management of the default branch name
When a member of your organization creates a new repository, {% data variables.product.prodname_dotcom %} will create a single branch and set it as the repository's default branch. {% data variables.product.prodname_dotcom %} currently names the default branch `master`, but you can set the default branch to be named anything that makes sense for your development environment.
When a member of your organization creates a new repository in your organization, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories that members of your organization create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
{% data reusables.branches.set-default-branch %}
{% data reusables.branches.rename-existing-branch %}
{% data reusables.branches.change-default-branch %}
### Setting the default branch name
@ -24,7 +23,7 @@ When a member of your organization creates a new repository, {% data variables.p
![Override button](/assets/images/help/organizations/repo-default-name-button.png)
{% note %}
**Note:** If your enterprise owner has enforced a policy for the default name, you won't be able to change it here. You will be able to set the default branch on individual repositories. For more information, see "[Enforcing a policy on the default branch name](/github/setting-up-and-managing-your-enterprise-account/enforcing-repository-management-policies-in-your-enterprise-account#enforcing-a-policy-on-the-default-branch-name)" and "[Setting the default branch](/github/administering-a-repository/setting-the-default-branch)."
**Note:** If your enterprise owner has enforced a policy for the default name, you won't be able to change it here. You will be able to set the default branch on individual repositories. For more information, see "[Enforcing a policy on the default branch name](/github/setting-up-and-managing-your-enterprise-account/enforcing-repository-management-policies-in-your-enterprise-account#enforcing-a-policy-on-the-default-branch-name)" and "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)."
{% endnote %}
4. Type the default name that you would like to use for new branches.
@ -34,4 +33,4 @@ When a member of your organization creates a new repository, {% data variables.p
### Further reading
- [Managing the default branch name for your repositories](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)
- "[Managing the default branch name for your repositories](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)"

Просмотреть файл

@ -70,6 +70,7 @@ Organization members can have *owner*{% if currentVersion == "free-pro-team@late
| Convert organization members to [outside collaborators](#outside-collaborators) | **X** | | |
| [View people with access to an organization repository](/articles/viewing-people-with-access-to-your-repository) | **X** | | |
| [Export a list of people with access to an organization repository](/articles/viewing-people-with-access-to-your-repository/#exporting-a-list-of-people-with-access-to-your-repository) | **X** | | |
| Manage the default branch name (see "[Managing the default branch name for repositories in your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization)") | **X** | | |
| Manage default labels (see "[Managing default labels for repositories in your organization](/articles/managing-default-labels-for-repositories-in-your-organization)") | **X** | | |
| Enable team synchronization (see "[Managing team synchronization for your organization](/github/setting-up-and-managing-organizations-and-teams/managing-team-synchronization-for-your-organization)" for details) | **X** | | |

Просмотреть файл

@ -202,7 +202,8 @@ For more information, see "[Restricting publication of {% data variables.product
| `remove_outside_collaborator` | Triggered when an owner removes an outside collaborator from an organization or when [two-factor authentication is required in an organization](/articles/requiring-two-factor-authentication-in-your-organization) and an outside collaborator does not use 2FA or disables 2FA. |{% if currentVersion == "free-pro-team@latest" %}
| `revoke_external_identity` | Triggered when an organization owner revokes a member's linked identity. For more information, see "[Viewing and managing a member's SAML access to your organization](/github/setting-up-and-managing-organizations-and-teams/viewing-and-managing-a-members-saml-access-to-your-organization#viewing-and-revoking-a-linked-identity)."
| `revoke_sso_session` | Triggered when an organization owner revokes a member's SAML session. For more information, see "[Viewing and managing a member's SAML access to your organization](/github/setting-up-and-managing-organizations-and-teams/viewing-and-managing-a-members-saml-access-to-your-organization#viewing-and-revoking-a-linked-identity)."
| `unblock_user` | Triggered when an organization owner [unblocks a user from an organization](/articles/unblocking-a-user-from-your-organization).{% endif %}
| `unblock_user` | Triggered when an organization owner [unblocks a user from an organization](/articles/unblocking-a-user-from-your-organization).{% endif %}{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
| `update_new_repository_default_branch_setting` | Triggered when an owner changes the name of the default branch for new repositories in the organization. For more information, see "[Managing the default branch name for repositories in your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization)."{% endif %}
| `update_default_repository_permission` | Triggered when an owner changes the default repository permission level for organization members.
| `update_member` | Triggered when an owner changes a person's role from owner to member or member to owner.
| `update_member_repository_creation_permission` | Triggered when an owner changes the create repository permission for organization members.{% if currentVersion == "free-pro-team@latest" %}

Просмотреть файл

@ -67,7 +67,7 @@ Commits are only counted if they are made in the default branch or the `gh-pages
If your commits are in a non-default or non-`gh-pages` branch and you'd like them to count toward your contributions, you will need to do one of the following:
- [Open a pull request](/articles/creating-a-pull-request) to have your changes merged into the default branch or the `gh-pages` branch.
- [Change the default branch](/articles/setting-the-default-branch) of the repository.
- [Change the default branch](/github/administering-a-repository/changing-the-default-branch) of the repository.
{% warning %}

Просмотреть файл

@ -1,18 +1,16 @@
---
title: Managing the default branch name for your repositories
intro: You can set a default branch name for all new repositories that you create.
intro: 'You can set the default branch name new repositories that you create on {% data variables.product.product_location %}.'
versions:
free-pro-team: '*'
enterprise-server: '>=2.23'
---
### About the default branch name
### About management of the default branch name
{% data reusables.branches.new-repo-default-branch %} This branch is currently named `master`, but you can set the default branch name to anything that makes sense for your development environment.
When you create a new repository on {% data variables.product.product_location %}, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories you create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
{% data reusables.branches.set-default-branch %}
{% data reusables.branches.rename-existing-branch %}
{% data reusables.branches.change-default-branch %}
### Setting the default branch name
@ -27,4 +25,4 @@ versions:
### Further reading
- [Managing the default branch name for repositories in your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization)
- "[Managing the default branch name for repositories in your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization)"

Просмотреть файл

@ -37,7 +37,7 @@ The best way to explain subtree merges is to show by example. We will:
$ touch .gitignore
$ git add .gitignore
$ git commit -m "initial commit"
> [master (root-commit) 3146c2a] initial commit
> [main (root-commit) 3146c2a] initial commit
> 0 files changed, 0 insertions(+), 0 deletions(-)
> create mode 100644 .gitignore
```
@ -55,29 +55,29 @@ The best way to explain subtree merges is to show by example. We will:
> Receiving objects: 100% (1732/1732), 528.19 KiB | 621 KiB/s, done.
> Resolving deltas: 100% (1086/1086), done.
> From git://github.com/octocat/Spoon-Knife
> * [new branch] master -> Spoon-Knife/master
> * [new branch] main -> Spoon-Knife/main
```
2. Merge the `Spoon-Knife` project into the local Git project. This doesn't change any of your files locally, but it does prepare Git for the next step.
If you're using Git 2.9 or above:
```shell
$ git merge -s ours --no-commit --allow-unrelated-histories spoon-knife/master
$ git merge -s ours --no-commit --allow-unrelated-histories spoon-knife/main
> Automatic merge went well; stopped before committing as requested
```
If you're using Git 2.8 or below:
```shell
$ git merge -s ours --no-commit spoon-knife/master
$ git merge -s ours --no-commit spoon-knife/main
> Automatic merge went well; stopped before committing as requested
```
3. Create a new directory called **spoon-knife**, and copy the Git history of the `Spoon-Knife` project into it.
```shell
$ git read-tree --prefix=spoon-knife/ -u spoon-knife/master
$ git read-tree --prefix=spoon-knife/ -u spoon-knife/main
```
4. Commit the changes to keep them safe.
```shell
$ git commit -m "Subtree merged in spoon-knife"
> [master fe0ca25] Subtree merged in spoon-knife
> [main fe0ca25] Subtree merged in spoon-knife
```
Although we've only added one subproject, any number of subprojects can be incorporated into a Git repository.
@ -99,7 +99,7 @@ $ git pull -s subtree <em>remotename</em> <em>branchname</em>
For the example above, this would be:
```shell
$ git pull -s subtree spoon-knife master
$ git pull -s subtree spoon-knife main
```
### Further reading

Просмотреть файл

@ -11,9 +11,9 @@ versions:
If another person has pushed to the same branch as you, Git won't be able to push your changes:
```shell
$ git push origin master
$ git push origin main
> To https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>REPOSITORY</em>.git
> ! [rejected] master -> master (non-fast-forward)
> ! [rejected] main -> main (non-fast-forward)
> error: failed to push some refs to 'https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>REPOSITORY</em>.git'
> To prevent you from losing history, non-fast-forward updates were rejected
> Merge the remote changes (e.g. 'git pull') before pushing again. See the

Просмотреть файл

@ -12,7 +12,7 @@ versions:
The `git push` command takes two arguments:
* A remote name, for example, `origin`
* A branch name, for example, `master`
* A branch name, for example, `main`
For example:
@ -20,7 +20,7 @@ For example:
git push <em> &lt;REMOTENAME> &lt;BRANCHNAME> </em>
```
As an example, you usually run `git push origin master` to push your local changes
As an example, you usually run `git push origin main` to push your local changes
to your online repository.
### Renaming branches
@ -96,7 +96,7 @@ git fetch upstream
> remote: Total 62 (delta 27), reused 44 (delta 9)
> Unpacking objects: 100% (62/62), done.
> From https://{% data variables.command_line.codeblock %}/<em>octocat</em>/<em>repo</em>
> * [new branch] master -> upstream/master
> * [new branch] main -> upstream/main
```
When you're done making local changes, you can push your local branch to GitHub

Просмотреть файл

@ -33,7 +33,7 @@ If you create a new clone of the repository, you won't lose any of your Git hist
{% endtip %}
{% endwindows %}
- `BRANCH-NAME`: The default branch for your current project, for example, `master` or `gh-pages`.
- `BRANCH-NAME`: The default branch for your current project, for example, `main` or `gh-pages`.
```shell
$ git filter-branch --prune-empty --subdirectory-filter <em>FOLDER-NAME BRANCH-NAME </em>
# Filter the specified branch in your directory and remove empty commits

Просмотреть файл

@ -123,7 +123,7 @@ As before, Git is showing the commit message for you to edit. You can change the
Since you've altered Git history, the usual `git push origin` **will not** work. You'll need to modify the command by "force-pushing" your latest changes:
```shell
$ git push origin master --force
$ git push origin main --force
```
{% warning %}

Просмотреть файл

@ -11,8 +11,5 @@ popularLinks:
- /github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line
- /github/using-git/managing-remote-repositories
- /github/working-with-github-pages
versions:
free-pro-team: '*'
enterprise-server: '*'
versions: '*'
---

Просмотреть файл

@ -15,7 +15,7 @@ versions:
The [Deployments API][deploy API] provides your projects hosted on {% data variables.product.product_name %} with
the capability to launch them on a server that you own. Combined with
[the Status API][status API], you'll be able to coordinate your deployments
the moment your code lands on `master`.
the moment your code lands on the default branch.
This guide will use that API to demonstrate a setup that you can use.
In our scenario, we will:

Просмотреть файл

@ -43,7 +43,7 @@ the model and it opens up a ton of things you could potentially do with the API.
A consuming API needs to explicitly request a pull request to create a _test_ merge commit. A _test_ merge commit is created when you view the pull request in the UI and the "Merge" button is displayed, or when you [get](/v3/pulls/#get-a-pull-request), [create](/v3/pulls/#create-a-pull-request), or [edit](/v3/pulls/#update-a-pull-request) a pull request using the REST API. Without this request, the `merge` Git refs will fall out of date until the next time someone views the pull request.
If you are currently using polling methods that produce outdated `merge` Git refs, then GitHub recommends using the following steps to get the latest changes from the base branch (usually `master`):
If you are currently using polling methods that produce outdated `merge` Git refs, then GitHub recommends using the following steps to get the latest changes from the default branch:
1. Receive the pull request webhook.
2. Call [`GET /repos/{owner}/{repo}/pulls/{pull_number}`](/v3/pulls/#get-a-pull-request) to start a background job for creating the merge commit candidate.

Просмотреть файл

@ -276,7 +276,7 @@ repos.each do |repo|
end
```
From there, we'll cumulatively add each language found to a "master list":
From there, we'll cumulatively add each language found to a list of languages:
``` ruby
repo_langs.each do |lang, count|

Просмотреть файл

@ -196,7 +196,7 @@ In {% data variables.product.prodname_pages %} API endpoints with a `status` key
In {% data variables.product.prodname_pages %} API endpoints that return GitHub Pages site information, the JSON responses include these fields:
* `html_url`: The absolute URL (including scheme) of the rendered Pages site. For example, `https://username.github.io`.
* `source`: An object that contains the source branch and directory for the rendered Pages site. This includes:
- `branch`: The repository branch used to publish your [site's source files](/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site). For example, _master_ or _gh-pages_.
- `branch`: The repository branch used to publish your [site's source files](/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site). For example, _main_ or _gh-pages_.
- `path`: The repository directory from which the site publishes. Will be either `/` or `/docs`.
{% for operation in currentRestOperations %}
@ -229,8 +229,7 @@ start compiling these statistics. Give the job a few moments to complete, and
then submit the request again. If the job has completed, that request will receive a
`200` response with the statistics in the response body.
Repository statistics are cached by the SHA of the repository's default branch,
which is usually master; pushing to the default branch resets the statistics cache.
Repository statistics are cached by the SHA of the repository's default branch; pushing to the default branch resets the statistics cache.
### Statistics exclude some types of commits

Просмотреть файл

@ -177,8 +177,7 @@
Your personal dashboard is the main hub of your activity on GitHub. From your personal dashboard, you can keep track of issues and pull requests you're following or working on, navigate to your top repositories and team pages, and learn about recent activity in repositories you're watching or participating in. You can also discover new repositories, which are recommended based on users you're following and repositories you have starred. To only view activity for a specific organization, visit your organization's dashboard. For more information, see "[About your personal dashboard](/articles/about-your-personal-dashboard)" or "[About your organization dashboard](/articles/about-your-organization-dashboard)."
- term: default branch
description: >-
The base branch in your repository, against which all pull requests and code
commits are automatically made, unless you specify a different branch. This branch is usually called `master`.
The base branch for new pull requests and code commits in a repository. Each repository has at least one branch, which Git creates when you initialize the repository. The first branch is usually called `main`, and is often the default branch.
- term: Dependents graph
description: >-
A repository graph that shows the packages, projects, and repositories that depend on a

Просмотреть файл

@ -0,0 +1 @@
You can change the default branch for an existing repository. For more information, see "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)."

Просмотреть файл

@ -1 +1,2 @@
The default branch is the base branch in your repository, against which all pull requests and code commits are automatically made, unless you specify a different branch.
Unless you specify a different branch, the default branch in a repository is the base branch for new pull requests and code commits.

Просмотреть файл

@ -1 +1,2 @@
When you create a repository on {% data variables.product.prodname_dotcom %} with content, the repository is initialized with a single branch, called the default branch.
When you create a repository with content on {% data variables.product.product_location %}, {% data variables.product.product_name %} creates the repository with a single branch. This first branch in the repository is the default branch.

Просмотреть файл

@ -1,3 +0,0 @@
While you can rename your repository's existing default branch, {% data variables.product.company_short %} plans to provide tools to simplify the process of renaming the default branch. For more information on these plans, see [`github/renaming`](https://github.com/github/renaming).
If you have already renamed the default branch, {% data variables.product.prodname_dotcom %} will automatically redirect links on {% if currentVersion ver_gt "enterprise-server@2.22" %} {% data variables.product.product_location_enterprise %}{% else %}{% data variables.product.prodname_dotcom_the_website %}{% endif %} that contain a deleted `master` branch name to the equivalent link on the repository's default branch.

Просмотреть файл

@ -1 +1 @@
If you have admin permissions to a repository, you can change the default branch to another existing branch. For more information, see "[Setting the default branch](/github/administering-a-repository/setting-the-default-branch)."
You can set the name of the default branch for new repositories. For more information, see "[Managing the default branch for your repositories](/github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories)," "[Managing the default branch name for repositories in your organization](/github/setting-up-and-managing-organizations-and-teams/managing-the-default-branch-name-for-repositories-in-your-organization)," or "[Enforcing a policy on the default branch name](/github/setting-up-and-managing-your-enterprise-account/enforcing-repository-management-policies-in-your-enterprise-account#enforcing-a-policy-on-the-default-branch-name)."

Просмотреть файл

@ -1 +1 @@
1. Select either the current branch, or the default branch (usually master) to base the new branch on.
1. Use the drop-down to choose a base branch for your new branch.

Просмотреть файл

@ -1,6 +1,6 @@
1. If you're replacing the MySQL master node or Redis master node, in `cluster.conf`, modify the `mysql-master` or `redis-master` value with the replacement node name.
1. If you're replacing the primary MySQL or Redis node, in `cluster.conf`, modify the `mysql-master` or `redis-master` value with the replacement node name.
For example, this modified `cluster.conf` file specifies a newly provisioned cluster node, `ghe-replacement-data-node-1` as the MySQL and Redis master node:
For example, this modified `cluster.conf` file specifies a newly provisioned cluster node, `ghe-replacement-data-node-1` as the primary MySQL and Redis node:
<pre>
mysql-master = <em>ghe-replacement-data-node-1</em>

Просмотреть файл

@ -19,13 +19,13 @@ If you need to specify activity types or configuration for an event, you must co
```yaml
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
# Also trigger on page_build, as well as release created events
page_build:
release:

Просмотреть файл

@ -1,5 +1,5 @@
{% note %}
**Note:** This event will only trigger a workflow run if the workflow file is on the `master` or default branch.
**Note:** This event will only trigger a workflow run if the workflow file is on the default branch.
{% endnote %}

Просмотреть файл

@ -1 +0,0 @@
An entity that has agreed to the Corporate Terms of Service for an organization can enter a data protection agreement with {% data variables.product.prodname_dotcom %} for General Data Protection Regulation (GDPR) compliance.

Просмотреть файл

@ -2,5 +2,5 @@ Key | Type | Description
----|------|-------------
`ref`|`string` | The [`git ref`](/v3/git/refs/#get-a-reference) resource.
`ref_type`|`string` | The type of Git ref object created in the repository. Can be either `branch` or `tag`.
`master_branch`|`string` | The name of the repository's default branch (usually `master`).
`master_branch`|`string` | The name of the repository's default branch (usually {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.23" %}`main`{% else %}`master`{% endif %}).
`description`|`string` | The repository's current description.

Просмотреть файл

@ -1 +1 @@
Represents an attempted build of a GitHub Pages site, whether successful or not. A push to a GitHub Pages enabled branch (`gh-pages` for project pages, `master` for user and organization pages) triggers this event.
Represents an attempted build of a {% data variables.product.prodname_pages %} site, whether successful or not. A push to a {% data variables.product.prodname_pages %} enabled branch (`gh-pages` for project pages, the default branch for user and organization pages) triggers this event.

12
package-lock.json сгенерированный
Просмотреть файл

@ -1144,9 +1144,9 @@
}
},
"@github/rest-api-operations": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-2.0.1.tgz",
"integrity": "sha512-8/Nn4CnhX48uT92fthFL4jc9g07ysA+Gd6Y7ZvZypGYSFZcLsZjdf5QmxUWUI148Xq33F8eWUoqfuTigtiOhoQ=="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@github/rest-api-operations/-/rest-api-operations-2.1.0.tgz",
"integrity": "sha512-F9E4WIpe8LtDBI9vD8ZuAiaL6DaKv8wZQ2Qkay3hkbJZB4ehxCcgoDmGQODNQEb1u624gbnAOzTG2hrVSuZNUA=="
},
"@hapi/address": {
"version": "2.1.4",
@ -2612,9 +2612,9 @@
}
},
"@primer/octicons": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-10.0.0.tgz",
"integrity": "sha512-iuQubq62zXZjPmaqrsfsCZUqIJgZhmA6W0tKzIKGRbkoLnff4TFFCL87hfIRATZ5qZPM4m8ioT8/bXI7WVa9WQ==",
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-11.0.0.tgz",
"integrity": "sha512-aMM2n7dl4ToEqQH9ZWQ8M8alGCoGsRk2k5hT5h3KXd54YFKte1twhJDvyQjIjjxqggNh5NUfyuqTOv6MPCVSKQ==",
"requires": {
"object-assign": "^4.1.1"
}

Просмотреть файл

@ -15,10 +15,10 @@
"@github-docs/data-directory": "^1.2.0",
"@github-docs/frontmatter": "^1.3.1",
"@github-docs/render-content": "^5.0.0",
"@github/rest-api-operations": "^2.0.1",
"@github/rest-api-operations": "^2.1.0",
"@octokit/rest": "^16.38.1",
"@primer/css": "^15.1.0",
"@primer/octicons": "^10.0.0",
"@primer/octicons": "^11.0.0",
"airtable": "^0.9.0",
"algoliasearch": "^3.35.1",
"babel-loader": "^8.1.0",

Просмотреть файл

@ -287,8 +287,7 @@ describe('Page class', () => {
basePath: path.join(__dirname, '../../content'),
languageCode: 'en'
})
expect(page.versions[nonEnterpriseDefaultPlan]).toBe('*')
expect(page.versions['enterprise-server']).toBe('*')
expect(page.versions).toBe('*')
})
test('enterprise admin index page', async () => {

Просмотреть файл

@ -1,20 +0,0 @@
---
title: Eine Datenschutzvereinbarung mit GitHub in Bezug auf die Einhaltung der DSGVO abschließen
intro: '{% data reusables.organizations.enter-data-protection-agreement %}'
redirect_from:
- /articles/entering-a-data-protection-agreement-with-github-for-gdpr-compliance
versions:
free-pro-team: '*'
---
Dein Unternehmen, Dein gemeinnütziges Unternehmen, Dein Konzern oder Deine sonstige Entität muss den Unternehmensnutzungsbedingungen zugestimmt haben, damit Deine Organisation eine Datenschutzvereinbarung mit {% data variables.product.product_name %} abschließen kann. Weitere Informationen findest Du unter „[Auf Unternehmensnutzungsbedingungen umstellen](/articles/upgrading-to-the-corporate-terms-of-service).“
{% data reusables.profile.access_profile %}
{% data reusables.profile.access_org %}
{% data reusables.organizations.org_settings %}
4. Klicke unter „Data protection agreement“ (Datenschutzvereinbarung) auf **download and complete this form** (Dieses Formular herunterladen und ausfüllen). ![Bereich „Data protection agreement“ (Datenschutzvereinbarung)](/assets/images/help/organizations/data-protection-agreement.png)
5. Fülle das Formular aus, und stelle sicher, dass ein Zeichnungsberechtigter Deiner Entität das Formular signiert. Ein Zeichnungsberechtigter ist eine Person, die dazu autorisiert ist, die Vereinbarung im Namen der Entität zu unterzeichnen, die den Unternehmensnutzungsbedingungen für Deine Organisation zugestimmt hat.
6. Sende das Formular per E-Mail an {% data variables.contact.github_support %}.
### Weiterführende Informationen
- „[{% data variables.product.prodname_dotcom %}-Unternehmensnutzungsbedingungen](/articles/github-corporate-terms-of-service/)“

Просмотреть файл

@ -1 +0,0 @@
Eine Entität, die den Unternehmensnutzungsbedingungen für eine Organisation zugestimmt hat, kann eine Datenschutzvereinbarung mit {% data variables.product.prodname_dotcom %} in Bezug auf die Einhaltung der Datenschutz-Grundverordnung (DSGVO) abschließen.

Просмотреть файл

@ -1,20 +0,0 @@
---
title: Ingresar el acuerdo de protección de datos con GitHub para el cumplimiento del RGPD
intro: '{% data reusables.organizations.enter-data-protection-agreement %}'
redirect_from:
- /articles/entering-a-data-protection-agreement-with-github-for-gdpr-compliance
versions:
free-pro-team: '*'
---
Tu compañía, organización sin fines de lucro, grupo o cualquier otra entidad debe haber aceptado los Términos de servicio corporativos para que tu organización celebre un acuerdo de protección de datos con {% data variables.product.product_name %}. Para obtener más información, consulta "[Actualizarse a los Términos de servicio corporativos](/articles/upgrading-to-the-corporate-terms-of-service)".
{% data reusables.profile.access_profile %}
{% data reusables.profile.access_org %}
{% data reusables.organizations.org_settings %}
4. En "Acuerdo de protección de datos" haz clic en **Descargar y completar este formulario**. ![Sección del acuerdo de protección de datos](/assets/images/help/organizations/data-protection-agreement.png)
5. Completa el formulario y asegúrate de que lleve la firma de un representante autorizado de tu entidad. Un representante autorizado es una persona autorizada para firmar el acuerdo en nombre de la entidad que aceptó los Términos de servicio corporativos para tu organización.
6. Envía el formulario por correo electrónico a {% data variables.contact.github_support %}.
### Leer más
- "[{% data variables.product.prodname_dotcom %} Términos de servicio corporativos](/articles/github-corporate-terms-of-service/)"

Просмотреть файл

@ -1 +0,0 @@
Un entidad que ha aceptado los Términos de servicio corporativos para una organización puede celebrar un contrato de protección de datos con {% data variables.product.prodname_dotcom %} para dar cumplimiento al Reglamento General de Protección de Datos (RGPD).

Просмотреть файл

@ -1,20 +0,0 @@
---
title: GDPR 準拠のために GitHub とのデータ保護契約を締結する
intro: '{% data reusables.organizations.enter-data-protection-agreement %}'
redirect_from:
- /articles/entering-a-data-protection-agreement-with-github-for-gdpr-compliance
versions:
free-pro-team: '*'
---
あなたの会社、非営利団体、グループ、またはその他の事業体は、{% data variables.product.product_name %} とデータ保護同意を締結するために、企業利用規約に同意している必要があります。 詳細は「[企業向け利用規約にアップグレードする](/articles/upgrading-to-the-corporate-terms-of-service)」を参照してください。
{% data reusables.profile.access_profile %}
{% data reusables.profile.access_org %}
{% data reusables.organizations.org_settings %}
4. 「Data protection agreement」で、[**download and complete this form**] をクリックします。 ![データ保護同意セクション](/assets/images/help/organizations/data-protection-agreement.png)
5. フォームに入力します。事業体の署名者がフォームに署名するようにしてください。 署名者とは、Organization の企業利用規約に同意した事業体を代表して同意に署名することを許可された人を指します。
6. {% data variables.contact.github_support %} にフォームをメール送信します。
### 参考リンク
- 「[{% data variables.product.prodname_dotcom %}企業利用規約](/articles/github-corporate-terms-of-service/)」

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше