Merge branch 'main' into video-uploads-ga
This commit is contained in:
@@ -24,8 +24,10 @@ You can also see deployment information on the "Conversation" tab of a pull requ
|
||||
### Viewing the deployments dashboard
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. Above the list of files, click **Environments**.
|
||||

|
||||
2. {% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.21" %}To the right of the list of files, click **Environments**.
|
||||
{% else %}Above the list of files, click **Environments**.
|
||||
{% endif %}
|
||||
|
||||
|
||||
### Further reading
|
||||
- "[About pull requests](/articles/about-pull-requests)"
|
||||
|
||||
@@ -11,11 +11,13 @@ topics:
|
||||
- SSH
|
||||
---
|
||||
|
||||
When you set up SSH, you'll [generate an SSH key and add it to the ssh-agent](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and then [add the key to your {% data variables.product.product_name %} account](/articles/adding-a-new-ssh-key-to-your-github-account). Adding the SSH key to the ssh-agent ensures that your SSH key has an extra layer of security through the use of a passphrase. For more information, see "[Working with SSH key passphrases](/articles/working-with-ssh-key-passphrases)."
|
||||
When you set up SSH, you will need to generate a new SSH key and add it to the ssh-agent. You must add the SSH key to your account on {% data variables.product.product_name %} before you use the key to authenticate. For more information, see "[Generating a new SSH key and adding it to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)" and "[Adding a new SSH key to your {% data variables.product.prodname_dotcom %} account](/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)."
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" %}To use your SSH key with a repository owned by an organization that uses SAML single sign-on, you'll need to authorize it first. For more information, see "[Authorizing an SSH key for use with SAML single sign-on](/articles/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)."{% endif %}
|
||||
You can further secure your SSH key by using a hardware security key, which requires the physical hardware security key to be attached to your computer when the key pair is used to authenticate with SSH. You can also secure your SSH key by adding your key to the ssh-agent and using a passphrase. For more information, see "[Working with SSH key passphrases](/github/authenticating-to-github/working-with-ssh-key-passphrases)."
|
||||
|
||||
We recommend that you regularly [review your SSH keys list](/articles/reviewing-your-ssh-keys) and revoke any that are invalid or have been compromised.
|
||||
{% if currentVersion == "free-pro-team@latest" %}To use your SSH key with a repository owned by an organization that uses SAML single sign-on, you must authorize the key. For more information, see "[Authorizing an SSH key for use with SAML single sign-on](/articles/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)."{% endif %}
|
||||
|
||||
To maintain account security, you can regularly review your SSH keys list and revoke any keys that are invalid or have been compromised. For more information, see "[Reviewing your SSH keys](/github/authenticating-to-github/reviewing-your-ssh-keys)."
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" %}
|
||||
If you haven't used your SSH key for a year, then {% data variables.product.prodname_dotcom %} will automatically delete your inactive SSH key as a security precaution. For more information, see "[Deleted or missing SSH keys](/articles/deleted-or-missing-ssh-keys)."
|
||||
@@ -27,8 +29,4 @@ If you're a member of an organization that provides SSH certificates, you can us
|
||||
|
||||
- "[Checking for existing SSH keys](/articles/checking-for-existing-ssh-keys)"
|
||||
- "[Testing your SSH connection](/articles/testing-your-ssh-connection)"
|
||||
- "[Working with SSH key passphrases](/articles/working-with-ssh-key-passphrases)"
|
||||
- "[Troubleshooting SSH](/articles/troubleshooting-ssh)"
|
||||
{%- if currentVersion == "free-pro-team@latest" %}
|
||||
- "[Authorizing an SSH key for use with SAML single sign-on](/articles/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)"
|
||||
{%- endif %}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: 'Error: Unknown key type'
|
||||
intro: 'This error means that the SSH key type you used was unrecognized or is unsupported by your SSH client. '
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
enterprise-server: '>=3.2'
|
||||
github-ae: 'next'
|
||||
topics:
|
||||
- SSH
|
||||
---
|
||||
|
||||
### About the `unknown key type` error
|
||||
|
||||
When you generate a new SSH key, you may receive an `unknown key type` error if your SSH client does not support the key type that you specify.{% mac %}To solve this issue on macOS, you can update your SSH client or install a new SSH client.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You must have Homebrew installed. For more information, see the [installation guide](https://docs.brew.sh/Installation) in the Homebrew documentation.
|
||||
|
||||
### Solving the issue
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** If you install OpenSSH, your computer will not be able to retrieve passphrases that are stored in the Apple keychain. You will need to enter your passphrase or interact with your hardware security key every time you authenticate with SSH to {% data variables.product.prodname_dotcom %} or another web service.
|
||||
|
||||
If you remove OpenSSH, the passphrases that are stored in your keychain will once again be retrievable. You can remove OpenSSH by entering the command `brew uninstall openssh` in Terminal.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
1. Open Terminal.
|
||||
2. Enter the command `brew install openssh`.
|
||||
3. Quit and relaunch Terminal.
|
||||
4. Try the procedure for generating a new SSH key again. For more information, see "[Generating a new SSH key and adding it to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key-for-a-hardware-security-key)."
|
||||
|
||||
{% endmac %}{% linux %}To solve this issue on Linux, use the package manager for your Linux distribution to install a new version of OpenSSH, or compile a new version from source. If you install a different version of OpenSSH, the ability of other applications to authenticate via SSH may be affected. For more information, review the documentation for your distribution.{% endlinux %}
|
||||
@@ -13,9 +13,16 @@ topics:
|
||||
- SSH
|
||||
---
|
||||
|
||||
If you don't already have an SSH key, you must [generate a new SSH key](#generating-a-new-ssh-key). If you're unsure whether you already have an SSH key, check for [existing keys](/articles/checking-for-existing-ssh-keys).
|
||||
### About SSH key generation
|
||||
|
||||
If you don't want to reenter your passphrase every time you use your SSH key, you can [add your key to the SSH agent](#adding-your-ssh-key-to-the-ssh-agent), which manages your SSH keys and remembers your passphrase.
|
||||
If you don't already have an SSH key, you must generate a new SSH key to use for authentication. If you're unsure whether you already have an SSH key, you can check for existing keys. For more information, see "[Checking for existing SSH keys](/github/authenticating-to-github/checking-for-existing-ssh-keys)."
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" %}
|
||||
|
||||
If you want to use a hardware security key to authenticate to {% data variables.product.product_name %}, you must generate a new SSH key for your hardware security key. You must connect your hardware security key to your computer when you authenticate with the key pair. For more information, see the [OpenSSH 8.2 release notes](https://www.openssh.com/txt/release-8.2).
|
||||
|
||||
{% endif %}
|
||||
If you don't want to reenter your passphrase every time you use your SSH key, you can add your key to the SSH agent, which manages your SSH keys and remembers your passphrase.
|
||||
|
||||
### Generating a new SSH key
|
||||
|
||||
@@ -62,7 +69,7 @@ If you don't want to reenter your passphrase every time you use your SSH key, yo
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
4. At the prompt, type a secure passphrase. For more information, see ["Working with SSH key passphrases"](/articles/working-with-ssh-key-passphrases).
|
||||
4. At the prompt, type a secure passphrase. For more information, see ["Working with SSH key passphrases](/articles/working-with-ssh-key-passphrases)."
|
||||
```shell
|
||||
> Enter passphrase (empty for no passphrase): <em>[Type a passphrase]</em>
|
||||
> Enter same passphrase again: <em>[Type passphrase again]</em>
|
||||
@@ -70,7 +77,7 @@ If you don't want to reenter your passphrase every time you use your SSH key, yo
|
||||
|
||||
### Adding your SSH key to the ssh-agent
|
||||
|
||||
Before adding a new SSH key to the ssh-agent to manage your keys, you should have [checked for existing SSH keys](/articles/checking-for-existing-ssh-keys) and [generated a new SSH key](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key). <span class="platform-mac">When adding your SSH key to the agent, use the default macOS `ssh-add` command, and not an application installed by [macports](https://www.macports.org/), [homebrew](http://brew.sh/), or some other external source.</span>
|
||||
Before adding a new SSH key to the ssh-agent to manage your keys, you should have checked for existing SSH keys and generated a new SSH key. <span class="platform-mac">When adding your SSH key to the agent, use the default macOS `ssh-add` command, and not an application installed by [macports](https://www.macports.org/), [homebrew](http://brew.sh/), or some other external source.</span>
|
||||
|
||||
{% mac %}
|
||||
|
||||
@@ -137,7 +144,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
|
||||
|
||||
{% endnote %}
|
||||
|
||||
4. [Add the SSH key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account).
|
||||
4. Add the SSH key to your account on {% data variables.product.product_name %}. For more information, see "[Adding a new SSH key to your {% data variables.product.prodname_dotcom %} account](/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)."
|
||||
|
||||
{% endmac %}
|
||||
|
||||
@@ -155,7 +162,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
|
||||
2. Add your SSH private key to the ssh-agent. {% data reusables.ssh.add-ssh-key-to-ssh-agent %}
|
||||
{% data reusables.ssh.add-ssh-key-to-ssh-agent-commandline %}
|
||||
|
||||
3. [Add the SSH key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account).
|
||||
3. Add the SSH key to your account on {% data variables.product.product_name %}. For more information, see "[Adding a new SSH key to your {% data variables.product.prodname_dotcom %} account](/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)."
|
||||
|
||||
{% endwindows %}
|
||||
|
||||
@@ -163,13 +170,76 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
|
||||
|
||||
1. {% data reusables.command_line.start_ssh_agent %}
|
||||
|
||||
In some Linux environments, you need root access to run the command:
|
||||
|
||||
```
|
||||
$ sudo -s -H
|
||||
$ eval "$(ssh-agent -s)"
|
||||
> Agent pid 59566
|
||||
```
|
||||
|
||||
2. Add your SSH private key to the ssh-agent. {% data reusables.ssh.add-ssh-key-to-ssh-agent %}
|
||||
{% data reusables.ssh.add-ssh-key-to-ssh-agent-commandline %}
|
||||
|
||||
3. [Add the SSH key to your GitHub account](/articles/adding-a-new-ssh-key-to-your-github-account).
|
||||
3. Add the SSH key to your account on {% data variables.product.product_name %}. For more information, see "[Adding a new SSH key to your {% data variables.product.prodname_dotcom %} account](/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)."
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.1" %}
|
||||
### Generating a new SSH key for a hardware security key
|
||||
|
||||
If you are using macOS or Linux, you may need to update your SSH client or install a new SSH client prior to generating a new SSH key. For more information, see "[Error: Unknown key type](/github/authenticating-to-github/error-unknown-key-type)."
|
||||
|
||||
1. Insert your hardware security key into your computer.
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
3. Paste the text below, substituting in the email address for your account on {% data variables.product.product_name %}.
|
||||
```shell
|
||||
$ ssh-keygen -t ed25519-sk -C "<em>your_email@example.com</em>"
|
||||
```
|
||||
{% note %}
|
||||
|
||||
**Note:** If the command fails and you receive the error `invalid format` or `feature not supported,` you may be using a hardware security key that does not support the Ed25519 algorithm. Enter the following command instead.
|
||||
```shell
|
||||
$ ssh-keygen -t ecdsa-sk -C "your_email@example.com"
|
||||
```
|
||||
|
||||
{% endnote %}
|
||||
4. When you are prompted, touch the button on your hardware security key.
|
||||
5. When you are prompted to "Enter a file in which to save the key," press Enter to accept the default file location.
|
||||
|
||||
{% mac %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/Users/<em>you</em>/.ssh/id_ed25519_sk): <em>[Press enter]</em>
|
||||
```
|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/c/Users/<em>you</em>/.ssh/id_ed25519_sk):<em>[Press enter]</em>
|
||||
```
|
||||
|
||||
{% endwindows %}
|
||||
|
||||
{% linux %}
|
||||
|
||||
```shell
|
||||
> Enter a file in which to save the key (/home/<em>you</em>/.ssh/id_ed25519_sk): <em>[Press enter]</em>
|
||||
```
|
||||
|
||||
{% endlinux %}
|
||||
|
||||
6. When you are prompted to type a passphrase, press **Enter**.
|
||||
```shell
|
||||
> Enter passphrase (empty for no passphrase): <em>[Type a passphrase]</em>
|
||||
> Enter same passphrase again: <em>[Type passphrase again]</em>
|
||||
```
|
||||
7. Add the SSH key to your account on {% data variables.product.prodname_dotcom %}. For more information, see "[Adding a new SSH key to your {% data variables.product.prodname_dotcom %} account](/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Further reading
|
||||
|
||||
- "[About SSH](/articles/about-ssh)"
|
||||
|
||||
@@ -79,6 +79,7 @@ topics:
|
||||
{% link_in_list /error-agent-admitted-failure-to-sign %}
|
||||
{% link_in_list /error-ssh-add-illegal-option----k %}
|
||||
{% link_in_list /error-ssl-certificate-problem-verify-that-the-ca-cert-is-ok %}
|
||||
{% link_in_list /error-unknown-key-type %}
|
||||
{% link_in_list /error-were-doing-an-ssh-key-audit %}
|
||||
{% topic_link_in_list /managing-commit-signature-verification %}
|
||||
{% link_in_list /about-commit-signature-verification %}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
title: GitHub flow
|
||||
intro: 'At GitHub, we use our products every day and have developed a workflow to collaborate on projects. To make it work for teams regardless of their size or technical expertise, we made sure each step in our workflow can be completed within a web-based interface.'
|
||||
redirect_from:
|
||||
- /articles/creating-and-editing-files-in-your-repository/
|
||||
- /articles/github-flow-in-the-browser/
|
||||
- /articles/github-flow
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
enterprise-server: '*'
|
||||
github-ae: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
|
||||
### Following the GitHub flow
|
||||
|
||||
1. [Create a branch](/articles/creating-and-deleting-branches-within-your-repository) from the repository.
|
||||
2. [Create](/articles/creating-new-files), [edit](/articles/editing-files), [rename](/articles/renaming-a-file), [move](/articles/moving-a-file-to-a-new-location), or [delete](/github/managing-files-in-a-repository/deleting-files-in-a-repository) files.
|
||||
3. [Send a pull request](/articles/creating-a-pull-request) from your branch with your proposed changes to kick off a discussion.
|
||||
4. Make changes on your branch as needed. Your pull request will update automatically.
|
||||
5. [Merge the pull request](/articles/merging-a-pull-request) once the branch is ready to be merged.
|
||||
6. [Tidy up](/articles/deleting-unused-branches) your branches using the delete button in the pull request or on the branches page.
|
||||
|
||||
### Further reading
|
||||
|
||||
- The illustrated guide to "[Understanding the GitHub Flow](https://guides.github.com/introduction/flow/)"
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Collaborating with issues and pull requests
|
||||
intro: 'Use the {% data variables.product.prodname_dotcom %} flow to track and discuss changes in issues, then propose and review changes in pull requests.'
|
||||
intro: 'Track and discuss changes in issues, then propose and review changes in pull requests.'
|
||||
redirect_from:
|
||||
- /categories/63/articles/
|
||||
- /categories/collaborating/
|
||||
@@ -20,7 +20,6 @@ topics:
|
||||
|
||||
{% topic_link_in_list /getting-started %}
|
||||
{% link_in_list /quickstart-for-communicating-on-github %}
|
||||
{% link_in_list /github-flow %}
|
||||
{% link_in_list /about-collaborative-development-models %}
|
||||
{% topic_link_in_list /working-with-forks %}
|
||||
{% link_in_list /about-forks %}
|
||||
|
||||
@@ -24,7 +24,7 @@ Anyone with read permissions to a template repository can create a repository fr
|
||||
{% endif %}
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.20" %}
|
||||
You can choose to include the directory structure and files from only the default branch of the template repository or to include all branches.
|
||||
You can choose to include the directory structure and files from only the default branch of the template repository or to include all branches. Branches created from a template have unrelated histories, which means you cannot create pull requests or merge between the branches.
|
||||
{% endif %}
|
||||
|
||||
Creating a repository from a template is similar to forking a repository, but there are important differences:
|
||||
|
||||
@@ -20,7 +20,7 @@ topics:
|
||||
|
||||
To create a template repository, you must create a repository, then make the repository a template. For more information about creating a repository, see "[Creating a new repository](/articles/creating-a-new-repository)."
|
||||
|
||||
After you make your repository a template, anyone with access to the repository can generate a new repository with the same directory structure and files as your default branch.{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.20" %} They can also choose to include all the other branches in your repository.{% endif %} For more information, see "[Creating a repository from a template](/articles/creating-a-repository-from-a-template)."
|
||||
After you make your repository a template, anyone with access to the repository can generate a new repository with the same directory structure and files as your default branch.{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.20" %} They can also choose to include all the other branches in your repository. Branches created from a template have unrelated histories, so you cannot create pull requests or merge between the branches.{% endif %} For more information, see "[Creating a repository from a template](/articles/creating-a-repository-from-a-template)."
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
|
||||
@@ -13,7 +13,7 @@ topics:
|
||||
|
||||
### Choosing the right license
|
||||
|
||||
We created [choosealicense.com](http://choosealicense.com), to help you understand how to license your code. A software license tells others what they can and can't do with your source code, so it's important to make an informed decision.
|
||||
We created [choosealicense.com](https://choosealicense.com), to help you understand how to license your code. A software license tells others what they can and can't do with your source code, so it's important to make an informed decision.
|
||||
|
||||
You're under no obligation to choose a license. However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you're creating an open source project, we strongly encourage you to include an open source license. The [Open Source Guide](https://opensource.guide/legal/#which-open-source-license-is-appropriate-for-my-project) provides additional guidance on choosing the correct license for your project.
|
||||
|
||||
@@ -76,7 +76,7 @@ When you search by a family license, your results will include all licenses in t
|
||||
|
||||
### Detecting a license
|
||||
|
||||
[The open source Ruby gem Licensee](https://github.com/licensee/licensee) compares the repository's *LICENSE* file to a short list of known licenses. Licensee also provides the [Licenses API](/rest/reference/licenses) and [gives us insight into how repositories on {% data variables.product.product_name %} are licensed](https://github.com/blog/1964-open-source-license-usage-on-github-com). If your repository is using a license that isn't listed on the [Choose a License website](http://choosealicense.com/appendix/), you can [request including the license](https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license).
|
||||
[The open source Ruby gem Licensee](https://github.com/licensee/licensee) compares the repository's *LICENSE* file to a short list of known licenses. Licensee also provides the [Licenses API](/rest/reference/licenses) and [gives us insight into how repositories on {% data variables.product.product_name %} are licensed](https://github.com/blog/1964-open-source-license-usage-on-github-com). If your repository is using a license that isn't listed on the [Choose a License website](https://choosealicense.com/appendix/), you can [request including the license](https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license).
|
||||
|
||||
If your repository is using a license that is listed on the Choose a License website and it's not displaying clearly at the top of the repository page, it may contain multiple licenses or other complexity. To have your license detected, simplify your *LICENSE* file and note the complexity somewhere else, such as your repository's *README* file.
|
||||
|
||||
|
||||
@@ -175,28 +175,28 @@ jobs:
|
||||
actions: read{% endif %}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ];
|
||||
then pip install -r requirements.txt;
|
||||
fi
|
||||
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
||||
# that includes the dependencies
|
||||
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: python
|
||||
# Override the default behavior so that the action doesn't attempt
|
||||
# to auto-install Python dependencies
|
||||
setup-python-dependencies: false
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ];
|
||||
then pip install -r requirements.txt;
|
||||
fi
|
||||
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
||||
# that includes the dependencies
|
||||
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: python
|
||||
# Override the default behavior so that the action doesn't attempt
|
||||
# to auto-install Python dependencies
|
||||
setup-python-dependencies: false
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
@@ -296,6 +296,7 @@ paths-ignore:
|
||||
**Note**:
|
||||
|
||||
* The `paths` and `paths-ignore` keywords, used in the context of the {% data variables.product.prodname_code_scanning %} configuration file, should not be confused with the same keywords when used for `on.<push|pull_request>.paths` in a workflow. When they are used to modify `on.<push|pull_request>` in a workflow, they determine whether the actions will be run when someone modifies code in the specified directories. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths)."
|
||||
* The filter pattern characters `?`, `+`, `[`, `]`, and `!` are not supported and will be matched literally.
|
||||
* `**` characters can only be at the start or end of a line, or surrounded by slashes, and you can't mix `**` and other characters. For example, `foo/**`, `**/foo`, and `foo/**/bar` are all allowed syntax, but `**foo` isn't. However you can use single stars along with other characters, as shown in the example. You'll need to quote anything that contains a `*` character.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -59,16 +59,16 @@ jobs:
|
||||
image: codeql-container:f0f91db
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize {% data variables.product.prodname_codeql %}
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: {% raw %}${{ matrix.language }}{% endraw %}
|
||||
- name: Build
|
||||
run: |
|
||||
./configure
|
||||
make
|
||||
- name: Perform {% data variables.product.prodname_codeql %} Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Initialize {% data variables.product.prodname_codeql %}
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: {% raw %}${{ matrix.language }}{% endraw %}
|
||||
- name: Build
|
||||
run: |
|
||||
./configure
|
||||
make
|
||||
- name: Perform {% data variables.product.prodname_codeql %} Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
```
|
||||
|
||||
@@ -138,29 +138,29 @@ commit for best results.
|
||||
Fix this by removing the following lines from the {% data variables.product.prodname_codeql %} workflow. These lines were included in the `steps` section of the `Analyze` job in initial versions of the {% data variables.product.prodname_codeql %} workflow.
|
||||
|
||||
```yaml
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: {% raw %}${{ github.event_name == 'pull_request' }}{% endraw %}
|
||||
```
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: {% raw %}${{ github.event_name == 'pull_request' }}{% endraw %}
|
||||
```
|
||||
|
||||
The revised `steps` section of the workflow will look like this:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the {% data variables.product.prodname_codeql %} tools for scanning.
|
||||
- name: Initialize {% data variables.product.prodname_codeql %}
|
||||
uses: github/codeql-action/init@v1
|
||||
# Initializes the {% data variables.product.prodname_codeql %} tools for scanning.
|
||||
- name: Initialize {% data variables.product.prodname_codeql %}
|
||||
uses: github/codeql-action/init@v1
|
||||
|
||||
...
|
||||
...
|
||||
```
|
||||
|
||||
For more information about editing the {% data variables.product.prodname_codeql %} workflow file, see "[Configuring {% data variables.product.prodname_code_scanning %}](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#editing-a-code-scanning-workflow)."
|
||||
|
||||
@@ -59,7 +59,7 @@ name: "Upload SARIF"
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '45 15 * * 5'
|
||||
- cron: '45 15 * * 5'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -67,14 +67,14 @@ jobs:
|
||||
permissions:
|
||||
security-events: write{% endif %}
|
||||
steps:
|
||||
# This step checks out a copy of your repository.
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Upload SARIF file
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
# Path to SARIF file relative to the root of the repository
|
||||
sarif_file: results.sarif
|
||||
# This step checks out a copy of your repository.
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Upload SARIF file
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
# Path to SARIF file relative to the root of the repository
|
||||
sarif_file: results.sarif
|
||||
```
|
||||
|
||||
#### Example workflow that runs the ESLint analysis tool
|
||||
@@ -93,7 +93,7 @@ name: "ESLint analysis"
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '45 15 * * 1'
|
||||
- cron: '45 15 * * 1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -101,18 +101,18 @@ jobs:
|
||||
permissions:
|
||||
security-events: write{% endif %}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run npm install
|
||||
run: npm install
|
||||
# Runs the ESlint code analysis
|
||||
- name: Run ESLint
|
||||
# eslint exits 1 if it finds anything to report
|
||||
run: node_modules/.bin/eslint build docs lib script spec-main -f node_modules/@microsoft/eslint-formatter-sarif/sarif.js -o results.sarif || true
|
||||
# Uploads results.sarif to GitHub repository using the upload-sarif action
|
||||
- uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
# Path to SARIF file relative to the root of the repository
|
||||
sarif_file: results.sarif
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run npm install
|
||||
run: npm install
|
||||
# Runs the ESlint code analysis
|
||||
- name: Run ESLint
|
||||
# eslint exits 1 if it finds anything to report
|
||||
run: node_modules/.bin/eslint build docs lib script spec-main -f node_modules/@microsoft/eslint-formatter-sarif/sarif.js -o results.sarif || true
|
||||
# Uploads results.sarif to GitHub repository using the upload-sarif action
|
||||
- uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
# Path to SARIF file relative to the root of the repository
|
||||
sarif_file: results.sarif
|
||||
```
|
||||
|
||||
### Further reading
|
||||
|
||||
@@ -12,6 +12,8 @@ versions:
|
||||
github-ae: '*'
|
||||
---
|
||||
|
||||
### About subtree merges
|
||||
|
||||
Typically, a subtree merge is used to contain a repository within a repository. The "subrepository" is stored in a folder of the main repository.
|
||||
|
||||
The best way to explain subtree merges is to show by example. We will:
|
||||
|
||||
@@ -15,6 +15,8 @@ topics:
|
||||
- Accounts
|
||||
---
|
||||
|
||||
### Create a repository
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" %}
|
||||
|
||||
You can store a variety of projects in {% data variables.product.product_name %} repositories, including open source projects. With [open source projects](http://opensource.org/about), you can share code to make better, more reliable software.
|
||||
@@ -29,7 +31,7 @@ You can store a variety of projects in {% data variables.product.product_name %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You can create public repositories for an open source project. When creating your public repository, make sure to include a [license file](http://choosealicense.com/) that determines how you want your project to be shared with others. {% data reusables.open-source.open-source-guide-repositories %} {% data reusables.open-source.open-source-learning-lab %}
|
||||
**Note:** You can create public repositories for an open source project. When creating your public repository, make sure to include a [license file](https://choosealicense.com/) that determines how you want your project to be shared with others. {% data reusables.open-source.open-source-guide-repositories %} {% data reusables.open-source.open-source-learning-lab %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ topics:
|
||||
- Accounts
|
||||
---
|
||||
|
||||
### About forks
|
||||
|
||||
Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea.
|
||||
|
||||
#### Propose changes to someone else's project
|
||||
@@ -34,7 +36,7 @@ For more information about applying open source principles to your organization'
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}
|
||||
|
||||
When creating your public repository from a fork of someone's project, make sure to include a license file that determines how you want your project to be shared with others. For more information, see "[Choose an open source license](http://choosealicense.com/)" at choosealicense.com.
|
||||
When creating your public repository from a fork of someone's project, make sure to include a license file that determines how you want your project to be shared with others. For more information, see "[Choose an open source license](https://choosealicense.com/)" at choosealicense.com.
|
||||
|
||||
{% data reusables.open-source.open-source-guide-repositories %} {% data reusables.open-source.open-source-learning-lab %}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ versions:
|
||||
enterprise-server: '*'
|
||||
github-ae: '*'
|
||||
---
|
||||
### Options for getting changes
|
||||
|
||||
These commands are very useful when interacting with [a remote repository](/github/getting-started-with-github/about-remote-repositories). `clone` and `fetch` download remote code from a repository's remote URL to your local computer, `merge` is used to merge different people's work together with yours, and `pull` is a combination of `fetch` and `merge`.
|
||||
|
||||
### Cloning a repository
|
||||
|
||||
@@ -10,4 +10,4 @@ versions:
|
||||
enterprise-server: '*'
|
||||
github-ae: '*'
|
||||
---
|
||||
You can adopt the {% data variables.product.prodname_dotcom %} flow method to standardize how your team functions and collaborates on {% data variables.product.prodname_dotcom %}. For more information, see "[GitHub flow](/github/collaborating-with-issues-and-pull-requests/github-flow)" and "[Understanding the GitHub flow](http://guides.github.com/overviews/flow/)" in the {% data variables.product.prodname_dotcom %} Guides.
|
||||
You can adopt the {% data variables.product.prodname_dotcom %} flow method to standardize how your team functions and collaborates on {% data variables.product.prodname_dotcom %}. For more information, see "[{% data variables.product.prodname_dotcom %} flow](/github/getting-started-with-github/github-flow)."
|
||||
|
||||
99
content/github/getting-started-with-github/github-flow.md
Normal file
99
content/github/getting-started-with-github/github-flow.md
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: GitHub flow
|
||||
intro: 'Follow {% data variables.product.prodname_dotcom %} flow to collaborate on projects.'
|
||||
redirect_from:
|
||||
- /articles/creating-and-editing-files-in-your-repository/
|
||||
- /articles/github-flow-in-the-browser/
|
||||
- /articles/github-flow
|
||||
- /github/collaborating-with-issues-and-pull-requests/github-flow
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
enterprise-server: '*'
|
||||
github-ae: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Fundamentals
|
||||
miniTocMaxHeadingLevel: 4
|
||||
---
|
||||
|
||||
### Introduction
|
||||
|
||||
{% data variables.product.prodname_dotcom %} flow is a lightweight, branch-based workflow. The {% data variables.product.prodname_dotcom %} flow is useful for everyone, not just developers. For example, here at {% data variables.product.prodname_dotcom %}, we use {% data variables.product.prodname_dotcom %} flow for our [site policy](https://github.com/github/site-policy), [documentation](https://github.com/github/docs), and [roadmap](https://github.com/github/roadmap).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
To follow {% data variables.product.prodname_dotcom %} flow, you will need {% data variables.product.prodname_dotcom %} account and a repository. For information on how to create an account, see "[Signing up for {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/signing-up-for-github)." For information on how to create a repository, see "[Create a repo](/github/getting-started-with-github/create-a-repo)."{% if currentVersion == "free-pro-team@latest" %} For information on how to find an existing repository to contribute to, see "[Finding ways to contribute to open source on {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github)."{% endif %}
|
||||
|
||||
### Following {% data variables.product.prodname_dotcom %} flow
|
||||
|
||||
{% tip %}
|
||||
|
||||
{% if currentVersion == "free-pro-team@latest" %}
|
||||
**Tip:** You can complete all steps of {% data variables.product.prodname_dotcom %} flow through {% data variables.product.prodname_dotcom %} web interface, command line and [{% data variables.product.prodname_cli %}](https://cli.github.com), or [{% data variables.product.prodname_desktop %}](/desktop).
|
||||
{% else %}
|
||||
**Tip:** You can complete all steps of {% data variables.product.prodname_dotcom %} flow through {% data variables.product.prodname_dotcom %} web interface or through the command line and [{% data variables.product.prodname_cli %}](https://cli.github.com).
|
||||
{% endif %}
|
||||
|
||||
{% endtip %}
|
||||
|
||||
#### Create a branch
|
||||
|
||||
Create a branch in your repository. A short, descriptive branch name enables your collaborators to see ongoing work at a glance. For example, `increase-test-timeout` or `add-code-of-conduct`. 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)."
|
||||
|
||||
By creating a branch, you create a space to work without affecting the default branch. Additionally, you give collaborators a chance to review your work.
|
||||
|
||||
#### Make changes
|
||||
|
||||
On your branch, make any desired changes to the repository. For more information, see "[Creating new files](/articles/creating-new-files)," "[Editing files](/articles/editing-files)," "[Renaming a file](/articles/renaming-a-file)," "[Moving a file to a new location](/articles/moving-a-file-to-a-new-location)," or "[Deleting files in a repository](/github/managing-files-in-a-repository/deleting-files-in-a-repository)."
|
||||
|
||||
Your branch is a safe place to make changes. If you make a mistake, you can revert your changes or push additional changes to fix the mistake. Your changes will not end up on the default branch until you merge your branch.
|
||||
|
||||
Commit and push your changes to your branch. Give each commit a descriptive message to help you and future contributors understand what changes the commit contains. For example, `fix typo` or `increase rate limit`.
|
||||
|
||||
Ideally, each commit contains an isolated, complete change. This makes it easy to revert your changes if you decide to take a different approach. For example, if you want to rename a variable and add some tests, put the variable rename in one commit and the tests in another commit. Later, if you want to keep the tests but revert the variable rename, you can revert the specific commit that contained the variable rename. If you put the variable rename and tests in the same commit or spread the variable rename across multiple commits, you would spend more effort reverting your changes.
|
||||
|
||||
By committing and pushing your changes, you back up your work to remote storage. This means that you can access your work from any device. It also means that your collaborators can see your work, answer questions, and make suggestions or contributions.
|
||||
|
||||
Continue to make, commit, and push changes to your branch until you are ready to ask for feedback.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** Make a separate branch for each set of unrelated changes. This makes it easier for reviewers to give feedback. It also makes it easier for you and future collaborators to understand the changes and to revert or build on them. Additionally, if there is a delay in one set of changes, your other changes aren't also delayed.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
#### Create a pull request
|
||||
|
||||
Create a pull request to ask collaborators for feedback on your changes. Pull request review is so valuable that some repositories require an approving review before pull requests can be merged. If you want early feedback or advice before you complete your changes, you can mark your pull request as a draft. For more information, see "[Creating a pull request](/articles/creating-a-pull-request)."
|
||||
|
||||
When you create a pull request, include a summary of the changes and what problem they solve. You can include images, links, and tables to help convey this information. If your pull request addresses an issue, link the issue so that issue stakeholders are aware of the pull request and vice versa. If you link with a keyword, the issue will close automatically when the pull request merges. For more information, see "[Basic writing and formatting syntax](/github/writing-on-github/basic-writing-and-formatting-syntax)" and "[Linking a pull request to an issue](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)."
|
||||
|
||||

|
||||
|
||||
In addition to filling out the body of the pull request, you can add comments to specific lines of the pull request to explicitly point something out to the reviewers.
|
||||
|
||||

|
||||
|
||||
Your repository may be configured to automatically request a review from specific teams or users when a pull request is created. You can also manually @mention or request a review from specific people or teams.
|
||||
|
||||
If your repository has checks configured to run on pull requests, you will see any checks that failed on your pull request. This helps you catch errors before merging your branch. For more information, see "[About status checks](/github/collaborating-with-issues-and-pull-requests/about-status-checks)."
|
||||
|
||||
#### Address review comments
|
||||
|
||||
Reviewers should leave questions, comments, and suggestions. Reviewers can comment on the whole pull request or add comments to specific lines. You and reviewers can insert images or code suggestions to clarify comments. For more information, see "[Reviewing changes in pull requests](/github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests)."
|
||||
|
||||
You can continue to commit and push changes in response to the reviews. Your pull request will update automatically.
|
||||
|
||||
#### Merge your pull request
|
||||
|
||||
Once your pull request is approved, merge your pull request. This will automatically merge your branch so that your changes appear on the default branch. {% data variables.product.prodname_dotcom %} retains the history of comments and commits in the pull request to help future contributors understand your changes. For more information, see "[Merging a pull request](/articles/merging-a-pull-request)."
|
||||
|
||||
{% data variables.product.prodname_dotcom %} will tell you if your pull request has conflicts that must be resolved before merging. For more information, see "[Addressing merge conflicts](/github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts)."
|
||||
|
||||
Branch protection settings may block merging if your pull request does not meet certain requirements. For example, you need a certain number of approving reviews or an approving review from a specific team. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches)."
|
||||
|
||||
#### Delete your branch
|
||||
|
||||
After you merge your pull request, delete your branch. This indicates that the work on the branch is complete and prevents you or others from accidentally using old branches. For more information, see "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request)."
|
||||
|
||||
Don't worry about losing information. Your pull request and commit history will not be deleted. You can always restore your deleted branch or revert your pull request if needed.
|
||||
@@ -58,6 +58,7 @@ topics:
|
||||
{% link_in_list /set-up-git %}
|
||||
{% link_in_list /create-a-repo %}
|
||||
{% link_in_list /fork-a-repo %}
|
||||
{% link_in_list /github-flow %}
|
||||
{% link_in_list /be-social %}
|
||||
{% link_in_list /github-glossary %}
|
||||
{% link_in_list /git-cheatsheet %}
|
||||
|
||||
@@ -22,6 +22,8 @@ topics:
|
||||
- Accounts
|
||||
---
|
||||
|
||||
### Using Git
|
||||
|
||||
To use Git on the command line, you'll need to download, install, and configure Git on your computer. {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.19" or currentVersion == "github-ae@latest" %} You can also install {% data variables.product.prodname_cli %} to use {% data variables.product.product_name %} from the command line. For more information on {% data variables.product.prodname_cli %}, see the [{% data variables.product.prodname_cli %}](https://cli.github.com/manual/) documentation.{% endif %}
|
||||
|
||||
If you want to work with Git locally, but don't want to use the command line, you can instead download and install the [{% data variables.product.prodname_desktop %}]({% data variables.product.desktop_link %}) client. For more information, see "[Installing and configuring {% data variables.product.prodname_desktop %}](/desktop/installing-and-configuring-github-desktop/)."
|
||||
|
||||
@@ -11,6 +11,8 @@ versions:
|
||||
github-ae: '*'
|
||||
---
|
||||
|
||||
### Using Git rebase
|
||||
|
||||
In this example, we will cover all of the `git rebase` commands available, except for `exec`.
|
||||
|
||||
We'll start our rebase by entering `git rebase --interactive HEAD~7` on the terminal. Our favorite text editor will display the following lines:
|
||||
|
||||
Reference in New Issue
Block a user