1
0
mirror of synced 2026-02-01 21:01:46 -05:00

Merge pull request #19948 from github/site-tree-followup

Site tree followup
This commit is contained in:
Grace Park
2021-06-16 10:43:00 -07:00
committed by GitHub
160 changed files with 1421 additions and 225 deletions

View File

@@ -100,7 +100,6 @@ children:
- /deploying-to-amazon-elastic-container-service
- /deploying-to-azure-app-service
- /deploying-to-google-kubernetes-engine
- /deploying-to-google-kubernetes-engine
- /using-github-actions-for-project-management
- /closing-inactive-issues
- /scheduling-issue-creation

View File

@@ -0,0 +1,39 @@
---
title: About licensing for GitHub Advanced Security
intro: 'You need a license to use {% data variables.product.prodname_GH_advanced_security %} features, such as {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_secret_scanning %}.'
product: '{% data reusables.gated-features.ghas %}'
versions:
enterprise-server: '>=3.1'
type: overview
topics:
- Advanced Security
- Enterprise
- Licensing
- Security
redirect_from:
- /admin/advanced-security/about-licensing-for-github-advanced-security
---
## About licensing for {% data variables.product.prodname_GH_advanced_security %}
You can make extra features for code security available to users by buying and uploading a license for {% data variables.product.prodname_GH_advanced_security %}. For more information about {% data variables.product.prodname_GH_advanced_security %}, see "[About {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)."
{% data reusables.advanced-security.license-overview %}
To discuss licensing {% data variables.product.prodname_GH_advanced_security %} for {% data variables.product.product_name %}, contact {% data variables.contact.contact_enterprise_sales %}. To enable {% data variables.product.prodname_GH_advanced_security %}, see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your appliance](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)."
## About committer numbers for {% data variables.product.prodname_GH_advanced_security %}
{% data reusables.advanced-security.about-committer-numbers-ghec-ghes %}
## Managing your license usage for {% data variables.product.prodname_GH_advanced_security %}
{% data reusables.advanced-security.managing-license-usage-ghec-ghes %}
You can enforce policies to allow or disallow the use of {% data variables.product.prodname_advanced_security %} by organizations owned by your enterprise account. For more information, see "[Enforcing policies for {% data variables.product.prodname_advanced_security %} in your enterprise](/admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise)."
For more information on viewing license usage, see "[Viewing your {% data variables.product.prodname_GH_advanced_security %} usage](/admin/advanced-security/viewing-your-github-advanced-security-usage)."
## Getting the most out of your {% data variables.product.prodname_GH_advanced_security %} license
{% data reusables.advanced-security.getting-the-most-from-your-license %}

View File

@@ -0,0 +1,80 @@
---
title: Configuring code scanning for your appliance
shortTitle: Configuring code scanning
intro: 'You can enable, configure and disable {% data variables.product.prodname_code_scanning %} for {% data variables.product.product_location %}. {% data variables.product.prodname_code_scanning_capc %} allows users to scan code for vulnerabilities and errors.'
product: '{% data reusables.gated-features.code-scanning %}'
miniTocMaxHeadingLevel: 3
redirect_from:
- /enterprise/admin/configuration/configuring-code-scanning-for-your-appliance
- /admin/configuration/configuring-code-scanning-for-your-appliance
- /admin/advanced-security/configuring-code-scanning-for-your-appliance
versions:
enterprise-server: '>=2.22'
type: how_to
topics:
- Advanced Security
- Code scanning
- Enterprise
- Security
---
{% data reusables.code-scanning.beta %}
## About {% data variables.product.prodname_code_scanning %}
{% data reusables.code-scanning.about-code-scanning %}
You can configure {% data variables.product.prodname_code_scanning %} to run {% data variables.product.prodname_codeql %} analysis and third-party analysis. {% data variables.product.prodname_code_scanning_capc %} also supports running analysis natively using {% data variables.product.prodname_actions %} or externally using existing CI/CD infrastructure. The table below summarizes all the options available to users when you configure {% data variables.product.product_location %} to allow {% data variables.product.prodname_code_scanning %} using actions.
{% data reusables.code-scanning.enabling-options %}
## Prerequisites for {% data variables.product.prodname_code_scanning %}
- A license for {% data variables.product.prodname_GH_advanced_security %}{% if currentVersion ver_gt "enterprise-server@3.0" %} (see "[About licensing for {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security/about-licensing-for-github-advanced-security)"){% endif %}
- {% data variables.product.prodname_code_scanning_capc %} enabled in the management console (see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)")
- A VM or container for {% data variables.product.prodname_code_scanning %} analysis to run in.
## Running {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_actions %}
### Setting up a self-hosted runner
{% data variables.product.prodname_ghe_server %} can run {% data variables.product.prodname_code_scanning %} using a {% data variables.product.prodname_actions %} workflow. First, you need to provision one or more self-hosted {% data variables.product.prodname_actions %} runners in your environment. You can provision self-hosted runners at the repository, organization, or enterprise account level. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)" and "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."
You must ensure that Git is in the PATH variable on any self-hosted runners you use to run {% data variables.product.prodname_codeql %} actions.
### Provisioning the actions for {% data variables.product.prodname_code_scanning %}
{% if currentVersion ver_gt "enterprise-server@2.22" %}
If you want to use actions to run {% data variables.product.prodname_code_scanning %} on {% data variables.product.prodname_ghe_server %}, the actions must be available on your appliance.
The {% data variables.product.prodname_codeql %} action is included in your installation of {% data variables.product.prodname_ghe_server %}. If {% data variables.product.prodname_ghe_server %} has access to the internet, the action will automatically download the {% data variables.product.prodname_codeql %} bundle required to perform analysis. Alternatively, you can use a synchronization tool to make the {% data variables.product.prodname_codeql %} analysis bundle available locally. For more information, see "[Configuring {% data variables.product.prodname_codeql %} analysis on a server without internet access](#configuring-codeql-analysis-on-a-server-without-internet-access)" below.
You can also make third-party actions available to users for {% data variables.product.prodname_code_scanning %}, by setting up {% data variables.product.prodname_github_connect %}. For more information, see "[Configuring {% data variables.product.prodname_github_connect %} to sync {% data variables.product.prodname_actions %}](/enterprise/admin/configuration/configuring-code-scanning-for-your-appliance#configuring-github-connect-to-sync-github-actions)" below.
### Configuring {% data variables.product.prodname_codeql %} analysis on a server without internet access
If the server on which you are running {% data variables.product.prodname_ghe_server %} is not connected to the internet, and you want to allow users to enable {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} for their repositories, you must use the {% data variables.product.prodname_codeql %} action sync tool to copy the {% data variables.product.prodname_codeql %} analysis bundle from {% data variables.product.prodname_dotcom_the_website %} to your server. The tool, and details of how to use it, are available at [https://github.com/github/codeql-action-sync-tool](https://github.com/github/codeql-action-sync-tool/).
If you set up the {% data variables.product.prodname_codeql %} action sync tool, you can use it to sync the latest releases of the {% data variables.product.prodname_codeql %} action and associated {% data variables.product.prodname_codeql %} analysis bundle. These are compatible with {% data variables.product.prodname_ghe_server %}.
{% endif %}
{% if currentVersion == "enterprise-server@2.22" %}
To run {% data variables.product.prodname_code_scanning %} on {% data variables.product.prodname_ghe_server %} with {% data variables.product.prodname_actions %}, the appropriate actions must be available locally. You can make the actions available in three ways.
- **Recommended**: You can use [{% data variables.product.prodname_github_connect %}](/enterprise/admin/configuration/connecting-github-enterprise-server-to-github-enterprise-cloud) to automatically download actions from {% data variables.product.prodname_dotcom_the_website %}. The machine that hosts your instance must be able to access {% data variables.product.prodname_dotcom_the_website %}. This approach ensures that you get the latest software automatically. For more information, see "[Configuring {% data variables.product.prodname_github_connect %} to sync {% data variables.product.prodname_actions %}](/enterprise/admin/configuration/configuring-code-scanning-for-your-appliance#configuring-github-connect-to-sync-github-actions)."
- If you want to use the {% data variables.product.prodname_codeql_workflow %}, you can sync the repository from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_server %}, by using the {% data variables.product.prodname_codeql %} Action sync tool available at [https://github.com/github/codeql-action-sync-tool](https://github.com/github/codeql-action-sync-tool/). You can use this tool regardless of whether {% data variables.product.product_location %} or your {% data variables.product.prodname_actions %} runners have access to the internet, as long as you can access both {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %} simultaneously on your computer.
- You can create a local copy of an action's repository on your server, by cloning the {% data variables.product.prodname_dotcom_the_website %} repository that contains the action. For example, if you want to use the actions for {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}, you can create a repository in your instance called `github/codeql-action`, then clone the [repository](https://github.com/github/codeql-action) from {% data variables.product.prodname_dotcom_the_website %}, and then push that repository to your instance's `github/codeql-action` repository. You will also need to download any of the releases from the repository on {% data variables.product.prodname_dotcom_the_website %} and upload them to your instance's `github/codeql-action` repository as releases.
{% endif %}
### Configuring {% data variables.product.prodname_github_connect %} to sync {% data variables.product.prodname_actions %}
1. If you want to download action workflows on demand from {% data variables.product.prodname_dotcom_the_website %}, you need to enable {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling {% data variables.product.prodname_github_connect %}](/enterprise/admin/configuration/connecting-github-enterprise-server-to-github-enterprise-cloud#enabling-github-connect)."
2. You'll also need to enable {% data variables.product.prodname_actions %} for {% data variables.product.product_location %}. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server)."
3. The next step is to configure access to actions on {% data variables.product.prodname_dotcom_the_website %} using {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)."
4. Add a self-hosted runner to your repository, organization, or enterprise account. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."
## Running {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_runner %}
If you don't want to use {% data variables.product.prodname_actions %}, you can run {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_runner %}.
The {% data variables.product.prodname_codeql_runner %} is a command-line tool that you can add to your third-party CI/CD system. The tool runs {% data variables.product.prodname_codeql %} analysis on a checkout of a {% data variables.product.prodname_dotcom %} repository. For more information, see "[Running {% data variables.product.prodname_code_scanning %} in your CI system](/github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-your-ci-system)."

View File

@@ -0,0 +1,79 @@
---
title: Configuring secret scanning for your appliance
shortTitle: Configuring secret scanning
intro: 'You can enable, configure, and disable {% data variables.product.prodname_secret_scanning %} for {% data variables.product.product_location %}. {% data variables.product.prodname_secret_scanning_caps %} allows users to scan code for accidentally committed secrets.'
product: '{% data reusables.gated-features.secret-scanning %}'
miniTocMaxHeadingLevel: 3
redirect_from:
- /admin/configuration/configuring-secret-scanning-for-your-appliance
- /admin/advanced-security/configuring-secret-scanning-for-your-appliance
versions:
enterprise-server: '>=3.0'
type: how_to
topics:
- Advanced Security
- Enterprise
- Secret scanning
- Security
---
{% data reusables.secret-scanning.beta %}
## About {% data variables.product.prodname_secret_scanning %}
{% data reusables.secret-scanning.about-secret-scanning %} For more information, see "[About {% data variables.product.prodname_secret_scanning %}](/github/administering-a-repository/about-secret-scanning)."
## Prerequisites for {% data variables.product.prodname_secret_scanning %}
- The [SSSE3](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf#G3.1106470) (Supplemental Streaming SIMD Extensions 3) CPU flag needs to be enabled on the VM/KVM that runs {% data variables.product.product_location %}.
- A license for {% data variables.product.prodname_GH_advanced_security %}{% if currentVersion ver_gt "enterprise-server@3.0" %} (see "[About licensing for {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security/about-licensing-for-github-advanced-security)"){% endif %}
- {% data variables.product.prodname_secret_scanning_caps %} enabled in the management console (see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)")
## Checking support for the SSSE3 flag on your vCPUs
The SSSE3 set of instructions is required because {% data variables.product.prodname_secret_scanning %} leverages hardware accelerated pattern matching to find potential credentials committed to your {% data variables.product.prodname_dotcom %} repositories. SSSE3 is enabled for most modern CPUs. You can check whether SSSE3 is enabled for the vCPUs available to your {% data variables.product.prodname_ghe_server %} instance.
1. Connect to the administrative shell for your {% data variables.product.prodname_ghe_server %} instance. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)."
2. Enter the following command:
```shell
grep -iE '^flags.*ssse3' /proc/cpuinfo >/dev/null | echo $?
```
If this returns the value `0`, it means that the SSSE3 flag is available and enabled. You can now enable {% data variables.product.prodname_secret_scanning %} for {% data variables.product.product_location %}. For more information, see "[Enabling {% data variables.product.prodname_secret_scanning %}](#enabling-secret-scanning)" below.
If this doesn't return `0`, SSSE3 is not enabled on your VM/KVM. You need to refer to the documentation of the hardware/hypervisor on how to enable the flag, or make it available to guest VMs.
### Checking whether you have an {% data variables.product.prodname_advanced_security %} license
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
1. Check if there is an **{% data variables.product.prodname_advanced_security %}** entry in the left sidebar.
![Advanced Security sidebar](/assets/images/enterprise/management-console/sidebar-advanced-security.png)
{% data reusables.enterprise_management_console.advanced-security-license %}
## Enabling {% data variables.product.prodname_secret_scanning %}
{% data reusables.enterprise_management_console.enable-disable-security-features %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
{% data reusables.enterprise_management_console.advanced-security-tab %}
1. Under "{% data variables.product.prodname_advanced_security %}," click **{% data variables.product.prodname_secret_scanning_caps %}**.
![Checkbox to enable or disable {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/management-console/enable-secret-scanning-checkbox.png)
{% data reusables.enterprise_management_console.save-settings %}
## Disabling {% data variables.product.prodname_secret_scanning %}
{% data reusables.enterprise_management_console.enable-disable-security-features %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
{% data reusables.enterprise_management_console.advanced-security-tab %}
1. Under "{% data variables.product.prodname_advanced_security %}", unselect **{% data variables.product.prodname_secret_scanning_caps %}**.
![Checkbox to enable or disable {% data variables.product.prodname_secret_scanning %}](/assets/images/enterprise/management-console/secret-scanning-disable.png)
{% data reusables.enterprise_management_console.save-settings %}

View File

@@ -0,0 +1,94 @@
---
title: Enabling GitHub Advanced Security for your enterprise
shortTitle: Enabling GitHub Advanced Security
intro: 'You can configure {% data variables.product.product_name %} to include {% data variables.product.prodname_GH_advanced_security %}. This provides extra features that help users find and fix security problems in their code.'
product: '{% data reusables.gated-features.ghas %}'
versions:
enterprise-server: '>=2.22'
type: how_to
topics:
- Advanced Security
- Code scanning
- Enterprise
- Secret scanning
- Security
redirect_from:
- /admin/advanced-security/enabling-github-advanced-security-for-your-enterprise
---
## About enabling {% data variables.product.prodname_GH_advanced_security %}
{% data reusables.advanced-security.ghas-helps-developers %}
{% if currentVersion ver_gt "enterprise-server@3.0" %}
When you enable {% data variables.product.prodname_GH_advanced_security %} for your enterprise, repository administrators in all organizations can enable the features unless you set up a policy to restrict access. For more information, see "[Enforcing policies for {% data variables.product.prodname_advanced_security %} in your enterprise](/admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise)."
{% else %}
When you enable {% data variables.product.prodname_GH_advanced_security %} for your enterprise, repository administrators in all organizations can enable the features. {% if currentVersion == "enterprise-server@3.0" %}For more information, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)" and "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)."{% endif %}
{% endif %}
## Prerequisites for enabling {% data variables.product.prodname_GH_advanced_security %}
1. Upgrade your license for {% data variables.product.product_name %} to include {% data variables.product.prodname_GH_advanced_security %}.{% if currentVersion ver_gt "enterprise-server@3.0" %} For information about licensing, see "[About licensing for {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security/about-licensing-for-github-advanced-security)."{% endif %}
2. Upload the new license to {% data variables.product.product_location %}. For more information, see "[Managing your GitHub Enterprise license](/admin/overview/managing-your-github-enterprise-license#uploading-a-new-license-to-github-enterprise-server)."{% if currentVersion ver_gt "enterprise-server@2.22" %}
3. Review the prerequisites for the features you plan to enable.
- {% data variables.product.prodname_code_scanning_capc %}, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#prerequisites-for-code-scanning)."
- {% data variables.product.prodname_secret_scanning_caps %}, see "[Configuring {% data variables.product.prodname_secret_scanning %} for your appliance](/admin/advanced-security/configuring-secret-scanning-for-your-appliance#prerequisites-for-secret-scanning)."{% endif %}
## Checking whether your license includes {% data variables.product.prodname_GH_advanced_security %}
{% if currentVersion ver_gt "enterprise-server@3.0" %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.license-tab %}
1. If your license includes {% data variables.product.prodname_GH_advanced_security %}, the license page includes a section showing details of current usage.
![{% data variables.product.prodname_GH_advanced_security %} section of Enterprise license](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png)
{% endif %}
{% if currentVersion == "enterprise-server@2.22" or currentVersion == "enterprise-server@3.0" %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
1. If your license includes {% data variables.product.prodname_GH_advanced_security %}, there is an **{% data variables.product.prodname_advanced_security %}** entry in the left sidebar.
![Advanced Security sidebar](/assets/images/enterprise/management-console/sidebar-advanced-security.png)
{% data reusables.enterprise_management_console.advanced-security-license %}
{% endif %}
## Enabling and disabling {% data variables.product.prodname_GH_advanced_security %} features
{% data reusables.enterprise_management_console.enable-disable-security-features %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
{% data reusables.enterprise_management_console.advanced-security-tab %}{% if currentVersion ver_gt "enterprise-server@2.22" %}
1. Under "{% data variables.product.prodname_advanced_security %}," select the features that you want to enable and deselect any features you want to disable.
![Checkbox to enable or disable {% data variables.product.prodname_advanced_security %} features](/assets/images/enterprise/management-console/enable-advanced-security-checkboxes.png){% else %}
1. Under "{% data variables.product.prodname_advanced_security %}," click **{% data variables.product.prodname_code_scanning_capc %}**.
![Checkbox to enable or disable {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/management-console/enable-code-scanning-checkbox.png){% endif %}
{% data reusables.enterprise_management_console.save-settings %}
When {% data variables.product.product_name %} has finished restarting, you're ready to set up any additional resources required for newly enabled features. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance)."
## Enabling or disabling {% data variables.product.prodname_GH_advanced_security %} via the administrative shell (SSH)
You can enable or disable features programmatically on {% data variables.product.product_location %}. For more information about the administrative shell and command-line utilities for {% data variables.product.prodname_ghe_server %}, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[Command-line utilities](/admin/configuration/command-line-utilities#ghe-config)."
For example, you can enable {% data variables.product.prodname_code_scanning %} with your infrastructure-as-code tooling when you deploy an instance for staging or disaster recovery.
1. SSH into {% data variables.product.product_location %}.
1. Enable {% data variables.product.prodname_code_scanning %}.
```shell
ghe-config app.minio.enabled true
ghe-config app.code-scanning.enabled true
```
2. Optionally, disable {% data variables.product.prodname_code_scanning %}.
```shell
ghe-config app.minio.enabled false
ghe-config app.code-scanning.enabled false
```
3. Apply the configuration.
```shell
ghe-config-apply
```
{% if currentVersion ver_gt "enterprise-server@2.22" %}To enable and disable {% data variables.product.prodname_secret_scanning %} in the same way, set: `ghe-config app.secret-scanning.enabled` true or false and apply the configuration.{% endif %}

View File

@@ -0,0 +1,22 @@
---
title: Managing GitHub Advanced Security for your enterprise
shortTitle: Managing GitHub Advanced Security
intro: 'You can configure {% data variables.product.prodname_advanced_security %} and manage use by your enterprise to suit your organization''s needs.'
product: '{% data reusables.gated-features.ghas %}'
redirect_from:
- /enterprise/admin/configuration/configuring-advanced-security-features
- /admin/configuration/configuring-advanced-security-features
- /admin/advanced-security
- /admin/advanced-security/index
versions:
enterprise-server: '>=2.22'
topics:
- Enterprise
children:
- /about-licensing-for-github-advanced-security
- /enabling-github-advanced-security-for-your-enterprise
- /configuring-code-scanning-for-your-appliance
- /configuring-secret-scanning-for-your-appliance
- /viewing-your-github-advanced-security-usage
---

View File

@@ -0,0 +1,29 @@
---
title: Viewing your GitHub Advanced Security usage
intro: 'You can view usage of your {% data variables.product.prodname_GH_advanced_security %} license.'
permissions: 'Enterprise owners can view usage for {% data variables.product.prodname_GH_advanced_security %}.'
product: '{% data reusables.gated-features.ghas %}'
versions:
enterprise-server: '>=3.1'
topics:
- Enterprise
redirect_from:
- /admin/advanced-security/viewing-your-github-advanced-security-usage
---
{% data reusables.advanced-security.about-ghas-license-seats %} For more information, see "[About licensing for {% data variables.product.prodname_GH_advanced_security %}](/admin/advanced-security/about-licensing-for-github-advanced-security)."
## Viewing license usage for {% data variables.product.prodname_GH_advanced_security %}
You can check how many seats your license includes and how many seats are currently in use.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.license-tab %}
The "{% data variables.product.prodname_GH_advanced_security %}" section shows details of the current usage. You can see the total number of seats used, as well as a table with the number of committers and unique committers for each organization.
![{% data variables.product.prodname_GH_advanced_security %} section of Enterprise license](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png)
5. Optionally, click the name of an organization where you are an owner to display the security and analysis settings for the organization.
![Owned organization in {% data variables.product.prodname_GH_advanced_security %} section of enterprise billing settings](/assets/images/help/billing/ghas-orgs-list-enterprise-click-org.png)
6. On the "Security & analysis" settings page, scroll to the "{% data variables.product.prodname_GH_advanced_security %} repositories" section to see a detailed breakdown of usage by repository for this organization.
![{% data variables.product.prodname_GH_advanced_security %} repositories section](/assets/images/help/enterprises/settings-security-analysis-ghas-repos-list.png)
For more information, see "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)."

View File

@@ -4,7 +4,6 @@ intro: 'If you purchase additional storage and bandwidth for {% data variables.l
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-git-large-file-storage
- /articles/about-billing-for-git-large-file-storage
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-git-large-file-storage
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-git-large-file-storage/about-billing-for-git-large-file-storage
versions:
free-pro-team: '*'

View File

@@ -6,7 +6,6 @@ redirect_from:
- /articles/downgrading-storage-and-bandwidth-for-a-personal-account/
- /articles/downgrading-storage-and-bandwidth-for-an-organization/
- /articles/downgrading-git-large-file-storage
- /github/setting-up-and-managing-billing-and-payments-on-github/downgrading-git-large-file-storage
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-git-large-file-storage/downgrading-git-large-file-storage
versions:
free-pro-team: '*'

View File

@@ -6,7 +6,6 @@ redirect_from:
- /articles/purchasing-additional-storage-and-bandwidth-for-a-personal-account/
- /articles/purchasing-additional-storage-and-bandwidth-for-an-organization/
- /articles/upgrading-git-large-file-storage
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-git-large-file-storage
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-git-large-file-storage/upgrading-git-large-file-storage
versions:
free-pro-team: '*'

View File

@@ -6,7 +6,6 @@ redirect_from:
- /articles/viewing-storage-and-bandwidth-usage-for-a-personal-account/
- /articles/viewing-storage-and-bandwidth-usage-for-an-organization/
- /articles/viewing-your-git-large-file-storage-usage
- /github/setting-up-and-managing-billing-and-payments-on-github/viewing-your-git-large-file-storage-usage
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-git-large-file-storage/viewing-your-git-large-file-storage-usage
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: 'If you install a paid app in {% data variables.product.prodname_marketpl
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-marketplace
- /articles/about-billing-for-github-marketplace
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-marketplace
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-marketplace-apps/about-billing-for-github-marketplace
versions:
free-pro-team: '*'

View File

@@ -6,7 +6,6 @@ redirect_from:
- /articles/canceling-an-app-for-your-personal-account/
- /articles/canceling-an-app-for-your-organization/
- /articles/canceling-a-github-marketplace-app
- /github/setting-up-and-managing-billing-and-payments-on-github/canceling-a-github-marketplace-app
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-marketplace-apps/canceling-a-github-marketplace-app
versions:
free-pro-team: '*'

View File

@@ -6,7 +6,6 @@ redirect_from:
- /articles/downgrading-an-app-for-your-personal-account/
- /articles/downgrading-an-app-for-your-organization/
- /articles/downgrading-the-billing-plan-for-a-github-marketplace-app
- /github/setting-up-and-managing-billing-and-payments-on-github/downgrading-the-billing-plan-for-a-github-marketplace-app
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-marketplace-apps/downgrading-the-billing-plan-for-a-github-marketplace-app
versions:
free-pro-team: '*'

View File

@@ -6,7 +6,6 @@ redirect_from:
- /articles/upgrading-an-app-for-your-personal-account/
- /articles/upgrading-an-app-for-your-organization/
- /articles/upgrading-the-billing-plan-for-a-github-marketplace-app
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-the-billing-plan-for-a-github-marketplace-app
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-marketplace-apps/upgrading-the-billing-plan-for-a-github-marketplace-app
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: You will be billed for your sponsorships with the rest of your paid produ
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-sponsors
- /articles/about-billing-for-github-sponsors
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-sponsors
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-sponsors/about-billing-for-github-sponsors
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: You can downgrade your sponsorship to a lower tier or cancel your sponsor
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/downgrading-a-sponsorship
- /articles/downgrading-a-sponsorship
- /github/setting-up-and-managing-billing-and-payments-on-github/downgrading-a-sponsorship
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-sponsors/downgrading-a-sponsorship
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: You can upgrade your sponsorship to a higher tier.
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-a-sponsorship
- /articles/upgrading-a-sponsorship
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-a-sponsorship
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-sponsors/upgrading-a-sponsorship
versions:
free-pro-team: '*'

View File

@@ -11,7 +11,6 @@ redirect_from:
- /articles/organization-billing-plans/
- /articles/github-s-billing-plans
- /articles/about-billing-for-github-accounts
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-accounts
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/about-billing-for-github-accounts
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: 'With per-user pricing, organizations pay based on team size to access ad
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-per-user-pricing
- /articles/about-per-user-pricing
- /github/setting-up-and-managing-billing-and-payments-on-github/about-per-user-pricing
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/about-per-user-pricing
versions:
free-pro-team: '*'

View File

@@ -7,7 +7,6 @@ redirect_from:
- /articles/discounted-organization-accounts/
- /articles/discounted-billing-plans/
- /articles/discounted-subscriptions-for-github-accounts
- /github/setting-up-and-managing-billing-and-payments-on-github/discounted-subscriptions-for-github-accounts
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/discounted-subscriptions-for-github-accounts
versions:
free-pro-team: '*'

View File

@@ -16,7 +16,6 @@ redirect_from:
- /articles/downgrading-your-organization-from-github-business-cloud-to-the-team-plan/
- /articles/downgrading-your-github-billing-plan/
- /articles/downgrading-your-github-subscription
- /github/setting-up-and-managing-billing-and-payments-on-github/downgrading-your-github-subscription
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/downgrading-your-github-subscription
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: 'When you upgrade the subscription for your personal account or organizat
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/how-does-upgrading-or-downgrading-affect-the-billing-process
- /articles/how-does-upgrading-or-downgrading-affect-the-billing-process
- /github/setting-up-and-managing-billing-and-payments-on-github/how-does-upgrading-or-downgrading-affect-the-billing-process
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/how-does-upgrading-or-downgrading-affect-the-billing-process
versions:
free-pro-team: '*'

View File

@@ -18,7 +18,6 @@ redirect_from:
- /articles/adding-seats-to-your-organization/
- /articles/upgrading-your-github-billing-plan/
- /articles/upgrading-your-github-subscription
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-your-github-subscription
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/upgrading-your-github-subscription
versions:
free-pro-team: '*'

View File

@@ -7,7 +7,6 @@ redirect_from:
- /articles/viewing-and-managing-pending-changes-to-your-organization-s-billing-plan/
- /articles/viewing-and-managing-pending-changes-to-your-billing-plan/
- /articles/viewing-and-managing-pending-changes-to-your-subscription
- /github/setting-up-and-managing-billing-and-payments-on-github/viewing-and-managing-pending-changes-to-your-subscription
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-your-github-account/viewing-and-managing-pending-changes-to-your-subscription
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: 'Everything you purchase on {% data variables.product.prodname_dotcom %}
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-on-github
- /articles/about-billing-on-github
- /github/setting-up-and-managing-billing-and-payments-on-github/about-billing-on-github
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/about-billing-on-github
versions:
free-pro-team: '*'

View File

@@ -12,7 +12,6 @@ redirect_from:
- /articles/how-can-i-add-extra-information-to-my-organization-s-receipts/
- /articles/adding-information-to-your-organization-s-receipts/
- /articles/adding-information-to-your-receipts
- /github/setting-up-and-managing-billing-and-payments-on-github/adding-information-to-your-receipts
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/adding-information-to-your-receipts
versions:
free-pro-team: '*'

View File

@@ -16,7 +16,6 @@ redirect_from:
- /articles/updating-your-organization-s-payment-method/
- /articles/switching-payment-methods-for-your-organization/
- /articles/adding-or-editing-a-payment-method
- /github/setting-up-and-managing-billing-and-payments-on-github/adding-or-editing-a-payment-method
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/adding-or-editing-a-payment-method
versions:
free-pro-team: '*'

View File

@@ -7,7 +7,6 @@ redirect_from:
- /articles/switching-between-monthly-and-yearly-billing-for-your-personal-account/
- /articles/switching-between-monthly-and-yearly-billing-for-your-organization/
- /articles/changing-the-duration-of-your-billing-cycle
- /github/setting-up-and-managing-billing-and-payments-on-github/changing-the-duration-of-your-billing-cycle
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/changing-the-duration-of-your-billing-cycle
versions:
free-pro-team: '*'

View File

@@ -7,7 +7,6 @@ redirect_from:
- /articles/redeeming-a-coupon-for-your-personal-account/
- /articles/redeeming-a-coupon-for-organizations/
- /articles/redeeming-a-coupon
- /github/setting-up-and-managing-billing-and-payments-on-github/redeeming-a-coupon
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/redeeming-a-coupon
versions:
free-pro-team: '*'

View File

@@ -8,7 +8,6 @@ redirect_from:
- /articles/removing-a-credit-card-associated-with-your-organization/
- /articles/removing-a-payment-method-associated-with-your-organization/
- /articles/removing-a-payment-method
- /github/setting-up-and-managing-billing-and-payments-on-github/removing-a-payment-method
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/removing-a-payment-method
versions:
free-pro-team: '*'

View File

@@ -8,7 +8,6 @@ redirect_from:
- '/articles/how-do-i-change-the-billing-email,setting-your-billing-email/'
- /articles/setting-your-organization-s-billing-email/
- /articles/setting-your-billing-email
- /github/setting-up-and-managing-billing-and-payments-on-github/setting-your-billing-email
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/setting-your-billing-email
versions:
free-pro-team: '*'

View File

@@ -5,7 +5,6 @@ redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/troubleshooting-a-declined-credit-card-charge
- /articles/what-do-i-do-if-my-card-is-declined/
- /articles/troubleshooting-a-declined-credit-card-charge
- /github/setting-up-and-managing-billing-and-payments-on-github/troubleshooting-a-declined-credit-card-charge
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/troubleshooting-a-declined-credit-card-charge
versions:
free-pro-team: '*'

View File

@@ -10,7 +10,6 @@ redirect_from:
- /articles/unlocking-a-locked-personal-account/
- /articles/unlocking-a-locked-organization-account/
- /articles/unlocking-a-locked-account
- /github/setting-up-and-managing-billing-and-payments-on-github/unlocking-a-locked-account
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/unlocking-a-locked-account
versions:
free-pro-team: '*'

View File

@@ -7,7 +7,6 @@ redirect_from:
- /articles/downloading-receipts-for-personal-accounts/
- /articles/downloading-receipts-for-organizations/
- /articles/viewing-your-payment-history-and-receipts
- /github/setting-up-and-managing-billing-and-payments-on-github/viewing-your-payment-history-and-receipts
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/viewing-your-payment-history-and-receipts
versions:
free-pro-team: '*'

View File

@@ -5,7 +5,6 @@ redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-organizations-for-procurement-companies
- /articles/about-organizations-for-resellers/
- /articles/about-organizations-for-procurement-companies
- /github/setting-up-and-managing-billing-and-payments-on-github/about-organizations-for-procurement-companies
- /github/setting-up-and-managing-billing-and-payments-on-github/setting-up-paid-organizations-for-procurement-companies/about-organizations-for-procurement-companies
versions:
free-pro-team: '*'

View File

@@ -4,7 +4,6 @@ intro: 'You can create and pay for a {% data variables.product.prodname_dotcom %
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/creating-and-paying-for-an-organization-on-behalf-of-a-client
- /articles/creating-and-paying-for-an-organization-on-behalf-of-a-client
- /github/setting-up-and-managing-billing-and-payments-on-github/creating-and-paying-for-an-organization-on-behalf-of-a-client
- /github/setting-up-and-managing-billing-and-payments-on-github/setting-up-paid-organizations-for-procurement-companies/creating-and-paying-for-an-organization-on-behalf-of-a-client
versions:
free-pro-team: '*'

View File

@@ -5,7 +5,6 @@ redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/renewing-your-clients-paid-organization
- /articles/renewing-your-client-s-paid-organization
- /articles/renewing-your-clients-paid-organization
- /github/setting-up-and-managing-billing-and-payments-on-github/renewing-your-clients-paid-organization
- /github/setting-up-and-managing-billing-and-payments-on-github/setting-up-paid-organizations-for-procurement-companies/renewing-your-clients-paid-organization
versions:
free-pro-team: '*'

View File

@@ -5,7 +5,6 @@ redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-or-downgrading-your-clients-paid-organization
- /articles/upgrading-or-downgrading-your-client-s-paid-organization
- /articles/upgrading-or-downgrading-your-clients-paid-organization
- /github/setting-up-and-managing-billing-and-payments-on-github/upgrading-or-downgrading-your-clients-paid-organization
- /github/setting-up-and-managing-billing-and-payments-on-github/setting-up-paid-organizations-for-procurement-companies/upgrading-or-downgrading-your-clients-paid-organization
versions:
free-pro-team: '*'

View File

@@ -6,8 +6,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -8,8 +8,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -8,8 +8,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-the-codeql-workflow-for-compiled-languages
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -6,8 +6,6 @@ product: '{% data reusables.gated-features.code-scanning %}'
permissions: 'If you have write permission to a repository you can manage {% data variables.product.prodname_code_scanning %} alerts for that repository.'
versions:
enterprise-server: '2.22'
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -7,8 +7,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-a-container
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -8,8 +8,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/setting-up-code-scanning-for-a-repository
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -8,8 +8,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/triaging-code-scanning-alerts-in-pull-requests
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -7,8 +7,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-the-codeql-workflow
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -7,8 +7,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/about-integration-with-code-scanning
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -7,8 +7,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -8,8 +8,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/uploading-a-sarif-file-to-github
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -8,8 +8,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-codeql-code-scanning-in-your-ci-system
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -7,8 +7,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-your-ci-system
---
<!--See /content/code-security/secure-coding for the latest version of this article -->
<!--UI-LINK: When GitHub Enterprise Server doesn't have GitHub Actions set up, the Security > Code scanning alerts view links to this article.-->

View File

@@ -7,8 +7,6 @@ versions:
enterprise-server: '2.22'
topics:
- Security
redirect_from:
- /github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-codeql-code-scanning-in-your-ci-system
---
<!--See /content/code-security/secure-coding for the latest version of this article -->

View File

@@ -5,8 +5,6 @@ versions:
enterprise-server: <=2.22
topics:
- Security
redirect_from:
- /github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies
---
<!--See /content/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies for the current version of this article -->

View File

@@ -6,8 +6,6 @@ versions:
enterprise-server: '>=2.21 <=2.22'
topics:
- Security
redirect_from:
- /github/managing-security-vulnerabilities/configuring-notifications-for-vulnerable-dependencies
---
<!--See /content/code-security/supply-chain-security/configuring-notifications-for-vulnerable-dependencies for the current version of this article -->

View File

@@ -5,8 +5,6 @@ versions:
enterprise-server: <=2.22
topics:
- Repositories
redirect_from:
- /github/visualizing-repository-data-with-graphs/about-the-dependency-graph
---
<!--See /content/code-security/supply-chain-security/about-the-dependency-graph for the latest version of this article -->

View File

@@ -5,8 +5,6 @@ versions:
enterprise-server: <=2.22
topics:
- Repositories
redirect_from:
- /github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository
---
<!--See /content/code-security/supply-chain-security/exploring-the-dependencies-of-a-repository for the latest version of this article -->

View File

@@ -1,71 +0,0 @@
const path = require('path')
const walk = require('walk-sync').entries
const Page = require('./page')
const languages = require('./languages')
async function loadPageList () {
// load english pages
const englishPath = path.join(__dirname, '..', languages.en.dir, 'content')
const englishPaths = walk(englishPath, {
globs: ['**/*.md'],
ignore: ['**/README.md']
})
const englishPages = await Promise.all(englishPaths.map(
async opts => Page.init({
...opts,
languageCode: languages.en.code
})
))
// load matching pages in other languages
const localizedPaths = Object.values(languages)
.filter(({ code }) => code !== 'en')
.map(language => {
const basePath = path.join(__dirname, '..', language.dir, 'content')
return englishPages.map(page => ({
basePath,
relativePath: page.relativePath,
languageCode: language.code
}))
})
.flat()
const localizedPages = await Promise.all(localizedPaths.map(
async ({ basePath, relativePath, languageCode }) => Page.init({
basePath,
relativePath,
languageCode
})
))
// Build out the list of prepared pages
return englishPages
.concat(localizedPages)
.filter(Boolean)
}
function createMapFromArray (pageList) {
// add keys to the object for each of the page's permalinks for fast lookup
const pageMap =
pageList.reduce(
(pageMap, page) => {
for (const permalink of page.permalinks) {
pageMap[permalink.href] = page
}
return pageMap
},
{}
)
return pageMap
}
async function loadPageMap (pageList) {
const pages = pageList || await loadPageList()
return createMapFromArray(pages)
}
module.exports = {
loadPages: loadPageList,
loadPageMap
}

View File

@@ -4,7 +4,7 @@ const fs = require('fs')
const path = require('path')
const walk = require('walk-sync')
const { execSync } = require('child_process')
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
const patterns = require('../../lib/patterns')
const { supported } = require('../../lib/enterprise-server-releases')
const semver = require('semver')

View File

@@ -4,7 +4,7 @@ const fs = require('fs')
const path = require('path')
const walk = require('walk-sync')
const frontmatter = require('../../lib/read-frontmatter')
const { loadPages, loadPageMap } = require('../../lib/pages')
const { loadPages, loadPageMap } = require('../../lib/page-data')
const patterns = require('../../lib/patterns')
const loadRedirects = require('../../lib/redirects/precompile')
const allVersions = Object.keys(require('../../lib/all-versions'))

View File

@@ -13,7 +13,7 @@ const version = require('../../lib/enterprise-server-releases').oldestSupported
const archivalRepoName = 'help-docs-archived-enterprise-versions'
const archivalRepoUrl = `https://github.com/github/${archivalRepoName}`
const loadRedirects = require('../../lib/redirects/precompile')
const { loadPageMap } = require('../../lib/pages')
const { loadPageMap } = require('../../lib/page-data')
const remoteImageStoreBaseURL = 'https://githubdocs.azureedge.net/github-images'
// [start-readme]

View File

@@ -6,7 +6,7 @@ const walk = require('walk-sync')
const { execSync } = require('child_process')
const assert = require('assert')
const loadSiteData = require('../../lib/site-data')
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
const patterns = require('../../lib/patterns')
const getDataReferences = require('../../lib/get-liquid-data-references')
const imagesPath = '/assets/images'

View File

@@ -7,7 +7,7 @@
//
// [end-readme]
const { loadPages } = require('../lib/pages')
const { loadPages } = require('../lib/page-data')
const patterns = require('../lib/patterns')
async function main () {

View File

@@ -1,4 +1,4 @@
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
module.exports = async function findIndexablePages () {
const allPages = await loadPages()

View File

@@ -8,7 +8,7 @@
const renderContent = require('../lib/render-content')
const loadSiteData = require('../lib/site-data')
const { loadPages } = require('../lib/pages')
const { loadPages } = require('../lib/page-data')
const languages = require('../lib/languages')
const path = require('path')
const { promisify } = require('util')

View File

@@ -5,7 +5,7 @@ const walk = require('walk-sync')
const path = require('path')
const astFromMarkdown = require('mdast-util-from-markdown')
const visit = require('unist-util-visit')
const { loadPages, loadPageMap } = require('../lib/pages')
const { loadPages, loadPageMap } = require('../lib/page-data')
const loadSiteData = require('../lib/site-data')
const loadRedirects = require('../lib/redirects/precompile')
const { getPathWithoutLanguage, getPathWithoutVersion } = require('../lib/path-utils')

View File

@@ -64,7 +64,6 @@ describe('category pages', () => {
if (!categoryTuples.length) return
// TODO rework this for the new site tree structure
describe.each(categoryTuples)(
'category index "%s"',
(indexRelPath, indexAbsPath, indexLink) => {
@@ -78,7 +77,10 @@ describe('category pages', () => {
const indexContents = await readFileAsync(indexAbsPath, 'utf8')
const { data } = matter(indexContents)
categoryVersions = getApplicableVersions(data.versions, indexAbsPath)
const articleLinks = data.children
const articleLinks = data.children.filter(child => {
const mdPath = getPath(productDir, indexLink, child)
return fs.existsSync(mdPath) && fs.statSync(mdPath).isFile()
})
// Save the index title for later testing
indexTitle = await renderContent(data.title, { site: siteData }, { textOnly: true })
@@ -125,20 +127,19 @@ describe('category pages', () => {
)
})
// TODO get these tests passing after the new site tree code is in production
test.skip('contains all expected articles', () => {
test('contains all expected articles', () => {
const missingArticlePaths = difference(availableArticlePaths, publishedArticlePaths)
const errorMessage = formatArticleError('Missing article links:', missingArticlePaths)
expect(missingArticlePaths.length, errorMessage).toBe(0)
})
test.skip('does not any unexpected articles', () => {
test('does not have any unexpected articles', () => {
const unexpectedArticles = difference(publishedArticlePaths, availableArticlePaths)
const errorMessage = formatArticleError('Unexpected article links:', unexpectedArticles)
expect(unexpectedArticles.length, errorMessage).toBe(0)
})
test.skip('contains only articles and map topics with versions that are also available in the parent category', () => {
test('contains only articles and map topics with versions that are also available in the parent category', () => {
Object.entries(articleVersions).forEach(([articleName, articleVersions]) => {
const unexpectedVersions = difference(articleVersions, categoryVersions)
const errorMessage = `${articleName} has versions that are not available in parent category`

View File

@@ -1,5 +1,5 @@
const config = require('../helpers/crowdin-config').read()
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
const ignoredPagePaths = config.files[0].ignore
const ignoredDataPaths = config.files[2].ignore

View File

@@ -1,6 +1,6 @@
const { isEqual, get, uniqWith } = require('lodash')
const loadSiteData = require('../../lib/site-data')
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
const getDataReferences = require('../../lib/get-liquid-data-references')
const frontmatter = require('../../lib/read-frontmatter')
const fs = require('fs').promises

View File

@@ -3,7 +3,7 @@ const enterpriseServerReleases = require('../../lib/enterprise-server-releases')
const { get, getDOM, head, post } = require('../helpers/supertest')
const { describeViaActionsOnly } = require('../helpers/conditional-runs')
const path = require('path')
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
const builtAssets = require('../../lib/built-asset-urls')
const AZURE_STORAGE_URL = 'githubdocs.azureedge.net'

View File

@@ -1,5 +1,5 @@
const { liquid } = require('../../lib/render-content')
const { loadPageMap } = require('../../lib/pages')
const { loadPageMap } = require('../../lib/page-data')
const entities = new (require('html-entities').XmlEntities)()
const nonEnterpriseDefaultVersion = require('../../lib/non-enterprise-default-version')

View File

@@ -1,5 +1,5 @@
const path = require('path')
const { loadPages, loadPageMap } = require('../../lib/pages')
const { loadPages, loadPageMap } = require('../../lib/page-data')
const languageCodes = Object.keys(require('../../lib/languages'))
const { liquid } = require('../../lib/render-content')
const patterns = require('../../lib/patterns')
@@ -41,10 +41,7 @@ describe('pages module', () => {
expect(brokenPages.length, expectation).toBe(0)
})
// **TODO** fix duplicate redirects after new site tree feature flag is enabled
// we can't put this in tests/redirects because duplicate routes have already been
// overwritten during context.pages.redirects object assignment and can't be searched for
test.skip('redirect_from routes are unique across English pages', () => {
test('redirect_from routes are unique across English pages', () => {
const sourceRedirectFrom = chain(pages)
.filter(['languageCode', 'en'])
.filter('redirect_from')

View File

@@ -1,4 +1,4 @@
const { loadPages } = require('../../lib/pages')
const { loadPages } = require('../../lib/page-data')
const renderContent = require('../../lib/render-content')
const allVersions = Object.keys(require('../../lib/all-versions'))

View File

@@ -100,7 +100,6 @@ children:
- /deploying-to-amazon-elastic-container-service
- /deploying-to-azure-app-service
- /deploying-to-google-kubernetes-engine
- /deploying-to-google-kubernetes-engine
- /using-github-actions-for-project-management
- /closing-inactive-issues
- /scheduling-issue-creation
@@ -110,4 +109,3 @@ children:
- /removing-a-label-when-a-card-is-added-to-a-project-board-column
- /managing-github-actions-with-github-cli
---

View File

@@ -13,7 +13,6 @@ children:
- /about-enterprise-accounts
- /managing-your-github-enterprise-license
- /managing-billing-for-your-enterprise
- /about-upgrades-to-new-releases
- /system-overview
- /about-the-github-enterprise-api
---

View File

@@ -9,7 +9,7 @@ versions:
children:
- /adding-and-cloning-repositories
- /making-changes-in-a-branch
- /managing-commits
- /working-with-your-remote-repository-on-github-or-github-enterprise
- /keeping-your-local-repository-in-sync-with-github
---

View File

@@ -10,9 +10,5 @@ children:
- /committing-and-reviewing-changes-to-your-project
- /stashing-changes
- /pushing-changes-to-github
- /reverting-a-commit
- /cherry-picking-a-commit
- /managing-tags
- /viewing-the-branch-history
---

View File

@@ -0,0 +1,22 @@
---
title: Amending a commit
intro: 'You can use {% data variables.product.prodname_desktop %} to amend your last commit.'
versions:
free-pro-team: '*'
---
## About amending a commit
Amending a commit is a way to modify the most recent commit you have made in your current branch. This can be helpful if you need to edit the commit message or if you forgot to include changes in the commit.
You can continue to amend a commit until you push it to the remote repository. After you push a commit, the option to amend it is disabled in {% data variables.product.prodname_desktop %}. When you amend a commit, you replace the previous commit with a new commit to your current branch. Amending a commit that has been pushed to the remote repository could cause confusion for other collaborators working with the repository.
## Amending a commit
{% data reusables.desktop.history-tab %}
2. Right-click on the most recent commit and select **Amend commit**.
![Amend commit context menu](/assets/images/help/desktop/amend-commit-context-menu.png)
3. Click the **Summary** field to modify the commit message. Optionally, you can modify or add information about the commit in the **Description** field.
4. Select any uncommitted changes that you would like to add to the commit. For more information about selecting changes, see "[Committing and reviewing changes to your project](/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project#selecting-changes-to-include-in-a-commit)."
5. Once you have finalized your changes, click **Amend last commit**.
![Amend last commit overview](/assets/images/help/desktop/amend-last-commit-overview.png)

View File

@@ -0,0 +1,13 @@
---
title: Managing commits
intro: 'You can use {% data variables.product.prodname_desktop %} to amend, cherry-pick, reorder, revert, and squash commits.'
versions:
free-pro-team: '*'
children:
- /reverting-a-commit
- /cherry-picking-a-commit
- /reordering-commits
- /squashing-commits
- /amending-a-commit
- /managing-tags
---

View File

@@ -0,0 +1,41 @@
---
title: Reordering commits
intro: "You can use {% data variables.product.prodname_desktop %} to reorder commits in your branch's history."
versions:
free-pro-team: '*'
---
## About reordering a commit
Reordering allows you to alter your commit history to provide a more meaningful progression of commits. {% data variables.product.prodname_desktop %} allows you to drag-and-drop commits in your branch's history to reorder them.
## Reordering a commit
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, click the branch with the commits that you want to reorder.
{% data reusables.desktop.history-tab %}
4. Drag the commit that you want to reorder and drop it between two adjoining commits.
![reorder drag and drop](/assets/images/help/desktop/reorder-drag-and-drop.png)
While the application reorders the commits, a **Reorder in process** dialog indicates the progress of the change.
## Error messages when reordering commits
When you reorder commits, you may see one of the following notifications or error messages.
* A notification states that the requested change to the branch will require a force push to update the remote branch. This is shown when the commits that you reordered were previously pushed to the remote branch. Force pushing alters the commit history of the branch and will affect other collaborators who are working in that branch. Select **Begin reorder** to start the reorder, and then click **Force push origin** to push your changes.
![reorder force push dialog](/assets/images/help/desktop/reorder-force-push-dialog.png)
* An error states that the reorder failed because there is a merge commit among the reordered commits.
![reorder merge commit dialog](/assets/images/help/desktop/reorder-merge-commit-dialog.png)
* A notification is shown indicating that there are uncommitted changes present on your current branch. Select **Stash Changes and Continue** to store the changes and proceed, or select **Close** to dismiss the message and commit the changes. When there are no longer any uncommitted changes, you can reorder your commits.
![reorder stash dialog](/assets/images/help/desktop/reorder-stash-dialog.png)
* A message states that there are merge conflicts that you must resolve before the application can continue reordering commits on your branch.
1. Click **View conflicts** to see the conflicts.
{% data reusables.desktop.resolve-merge-conflicts %}
![reorder resolve conflicts message](/assets/images/help/desktop/reorder-resolve-conflicts.png)

View File

@@ -0,0 +1,52 @@
---
title: Squashing commits
intro: "You can use {% data variables.product.prodname_desktop %} to squash commits in your branch's history."
versions:
free-pro-team: '*'
---
## About squashing a commit
Squashing allows you to combine multiple commits in your branch's history into a single commit. This can help keep your repository's history more readable and understandable.
## Squashing a commit
{% mac %}
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, select the branch that has the commits that you want to squash.
{% data reusables.desktop.history-tab %}
4. Select the commits to squash and drop them on the commit you want to combine them with. You can select one commit or select multiple commits using <kbd>⌘</kbd> or <kbd>Shift</kbd>.
![squash drag and drop](/assets/images/help/desktop/squash-drag-and-drop.png)
5. Modify the commit message of your new commit. The commit messages of the selected commits you want to squash are pre-filled into the **Summary** and **Description** fields.
6. Click **Squash Commmits**.
{% endmac %}
{% windows %}
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, select the branch that has the commits that you want to squash.
{% data reusables.desktop.history-tab %}
4. Select the commits to squash and drop them on the commit you want to combine them with. You can select one commit or select multiple commits using <kbd>Ctrl</kbd> or <kbd>Shift</kbd>.
![squash drag and drop](/assets/images/help/desktop/squash-drag-and-drop.png)
5. Modify the commit message of your new commit. The commit messages of the selected commits you want to squash are pre-filled into the **Summary** and **Description** fields.
6. Click **Squash Commmits**.
{% endwindows %}
## Error messages when squashing commits
When you squash commits, you may see one of the following notifications or error messages.
* A notification states that the requested change to the branch will require a force push to update the remote branch. Force pushing alters the commit history of the branch and will affect other collaborators who are working in that branch. Select **Begin Squash** to start the squash, and then click **Force push origin** to push your changes.
![squash force push dialog](/assets/images/help/desktop/squash-force-push.png)
* An error states that the squash failed because there is a merge commit among the squashed commits.
![reorder merge commit dialog](/assets/images/help/desktop/squash-merge-commit-dialog.png)
* A notification is shown indicating that there are uncommitted changes present on your current branch. Select **Stash Changes and Continue** to store the changes and proceed, or select **Close** to dismiss the message and commit the changes. When there are no longer any uncommitted changes you can squash your commits.
![squash stash dialog](/assets/images/help/desktop/squash-stash-dialog.png)

View File

@@ -100,7 +100,6 @@ children:
- /deploying-to-amazon-elastic-container-service
- /deploying-to-azure-app-service
- /deploying-to-google-kubernetes-engine
- /deploying-to-google-kubernetes-engine
- /using-github-actions-for-project-management
- /closing-inactive-issues
- /scheduling-issue-creation
@@ -110,4 +109,3 @@ children:
- /removing-a-label-when-a-card-is-added-to-a-project-board-column
- /managing-github-actions-with-github-cli
---

View File

@@ -13,7 +13,6 @@ children:
- /about-enterprise-accounts
- /managing-your-github-enterprise-license
- /managing-billing-for-your-enterprise
- /about-upgrades-to-new-releases
- /system-overview
- /about-the-github-enterprise-api
---

View File

@@ -9,7 +9,7 @@ versions:
children:
- /adding-and-cloning-repositories
- /making-changes-in-a-branch
- /managing-commits
- /working-with-your-remote-repository-on-github-or-github-enterprise
- /keeping-your-local-repository-in-sync-with-github
---

View File

@@ -10,9 +10,5 @@ children:
- /committing-and-reviewing-changes-to-your-project
- /stashing-changes
- /pushing-changes-to-github
- /reverting-a-commit
- /cherry-picking-a-commit
- /managing-tags
- /viewing-the-branch-history
---

View File

@@ -0,0 +1,22 @@
---
title: Amending a commit
intro: 'You can use {% data variables.product.prodname_desktop %} to amend your last commit.'
versions:
free-pro-team: '*'
---
## About amending a commit
Amending a commit is a way to modify the most recent commit you have made in your current branch. This can be helpful if you need to edit the commit message or if you forgot to include changes in the commit.
You can continue to amend a commit until you push it to the remote repository. After you push a commit, the option to amend it is disabled in {% data variables.product.prodname_desktop %}. When you amend a commit, you replace the previous commit with a new commit to your current branch. Amending a commit that has been pushed to the remote repository could cause confusion for other collaborators working with the repository.
## Amending a commit
{% data reusables.desktop.history-tab %}
2. Right-click on the most recent commit and select **Amend commit**.
![Amend commit context menu](/assets/images/help/desktop/amend-commit-context-menu.png)
3. Click the **Summary** field to modify the commit message. Optionally, you can modify or add information about the commit in the **Description** field.
4. Select any uncommitted changes that you would like to add to the commit. For more information about selecting changes, see "[Committing and reviewing changes to your project](/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project#selecting-changes-to-include-in-a-commit)."
5. Once you have finalized your changes, click **Amend last commit**.
![Amend last commit overview](/assets/images/help/desktop/amend-last-commit-overview.png)

View File

@@ -0,0 +1,13 @@
---
title: Managing commits
intro: 'You can use {% data variables.product.prodname_desktop %} to amend, cherry-pick, reorder, revert, and squash commits.'
versions:
free-pro-team: '*'
children:
- /reverting-a-commit
- /cherry-picking-a-commit
- /reordering-commits
- /squashing-commits
- /amending-a-commit
- /managing-tags
---

View File

@@ -0,0 +1,41 @@
---
title: Reordering commits
intro: "You can use {% data variables.product.prodname_desktop %} to reorder commits in your branch's history."
versions:
free-pro-team: '*'
---
## About reordering a commit
Reordering allows you to alter your commit history to provide a more meaningful progression of commits. {% data variables.product.prodname_desktop %} allows you to drag-and-drop commits in your branch's history to reorder them.
## Reordering a commit
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, click the branch with the commits that you want to reorder.
{% data reusables.desktop.history-tab %}
4. Drag the commit that you want to reorder and drop it between two adjoining commits.
![reorder drag and drop](/assets/images/help/desktop/reorder-drag-and-drop.png)
While the application reorders the commits, a **Reorder in process** dialog indicates the progress of the change.
## Error messages when reordering commits
When you reorder commits, you may see one of the following notifications or error messages.
* A notification states that the requested change to the branch will require a force push to update the remote branch. This is shown when the commits that you reordered were previously pushed to the remote branch. Force pushing alters the commit history of the branch and will affect other collaborators who are working in that branch. Select **Begin reorder** to start the reorder, and then click **Force push origin** to push your changes.
![reorder force push dialog](/assets/images/help/desktop/reorder-force-push-dialog.png)
* An error states that the reorder failed because there is a merge commit among the reordered commits.
![reorder merge commit dialog](/assets/images/help/desktop/reorder-merge-commit-dialog.png)
* A notification is shown indicating that there are uncommitted changes present on your current branch. Select **Stash Changes and Continue** to store the changes and proceed, or select **Close** to dismiss the message and commit the changes. When there are no longer any uncommitted changes, you can reorder your commits.
![reorder stash dialog](/assets/images/help/desktop/reorder-stash-dialog.png)
* A message states that there are merge conflicts that you must resolve before the application can continue reordering commits on your branch.
1. Click **View conflicts** to see the conflicts.
{% data reusables.desktop.resolve-merge-conflicts %}
![reorder resolve conflicts message](/assets/images/help/desktop/reorder-resolve-conflicts.png)

View File

@@ -0,0 +1,52 @@
---
title: Squashing commits
intro: "You can use {% data variables.product.prodname_desktop %} to squash commits in your branch's history."
versions:
free-pro-team: '*'
---
## About squashing a commit
Squashing allows you to combine multiple commits in your branch's history into a single commit. This can help keep your repository's history more readable and understandable.
## Squashing a commit
{% mac %}
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, select the branch that has the commits that you want to squash.
{% data reusables.desktop.history-tab %}
4. Select the commits to squash and drop them on the commit you want to combine them with. You can select one commit or select multiple commits using <kbd>⌘</kbd> or <kbd>Shift</kbd>.
![squash drag and drop](/assets/images/help/desktop/squash-drag-and-drop.png)
5. Modify the commit message of your new commit. The commit messages of the selected commits you want to squash are pre-filled into the **Summary** and **Description** fields.
6. Click **Squash Commmits**.
{% endmac %}
{% windows %}
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, select the branch that has the commits that you want to squash.
{% data reusables.desktop.history-tab %}
4. Select the commits to squash and drop them on the commit you want to combine them with. You can select one commit or select multiple commits using <kbd>Ctrl</kbd> or <kbd>Shift</kbd>.
![squash drag and drop](/assets/images/help/desktop/squash-drag-and-drop.png)
5. Modify the commit message of your new commit. The commit messages of the selected commits you want to squash are pre-filled into the **Summary** and **Description** fields.
6. Click **Squash Commmits**.
{% endwindows %}
## Error messages when squashing commits
When you squash commits, you may see one of the following notifications or error messages.
* A notification states that the requested change to the branch will require a force push to update the remote branch. Force pushing alters the commit history of the branch and will affect other collaborators who are working in that branch. Select **Begin Squash** to start the squash, and then click **Force push origin** to push your changes.
![squash force push dialog](/assets/images/help/desktop/squash-force-push.png)
* An error states that the squash failed because there is a merge commit among the squashed commits.
![reorder merge commit dialog](/assets/images/help/desktop/squash-merge-commit-dialog.png)
* A notification is shown indicating that there are uncommitted changes present on your current branch. Select **Stash Changes and Continue** to store the changes and proceed, or select **Close** to dismiss the message and commit the changes. When there are no longer any uncommitted changes you can squash your commits.
![squash stash dialog](/assets/images/help/desktop/squash-stash-dialog.png)

View File

@@ -13,7 +13,6 @@ children:
- /about-enterprise-accounts
- /managing-your-github-enterprise-license
- /managing-billing-for-your-enterprise
- /about-upgrades-to-new-releases
- /system-overview
- /about-the-github-enterprise-api
---

View File

@@ -9,6 +9,7 @@ versions:
children:
- /adding-and-cloning-repositories
- /making-changes-in-a-branch
- /managing-commits
- /working-with-your-remote-repository-on-github-or-github-enterprise
- /keeping-your-local-repository-in-sync-with-github
---

View File

@@ -10,9 +10,5 @@ children:
- /committing-and-reviewing-changes-to-your-project
- /stashing-changes
- /pushing-changes-to-github
- /reverting-a-commit
- /cherry-picking-a-commit
- /managing-tags
- /viewing-the-branch-history
---

View File

@@ -0,0 +1,22 @@
---
title: Amending a commit
intro: 'You can use {% data variables.product.prodname_desktop %} to amend your last commit.'
versions:
free-pro-team: '*'
---
## About amending a commit
Amending a commit is a way to modify the most recent commit you have made in your current branch. This can be helpful if you need to edit the commit message or if you forgot to include changes in the commit.
You can continue to amend a commit until you push it to the remote repository. After you push a commit, the option to amend it is disabled in {% data variables.product.prodname_desktop %}. When you amend a commit, you replace the previous commit with a new commit to your current branch. Amending a commit that has been pushed to the remote repository could cause confusion for other collaborators working with the repository.
## Amending a commit
{% data reusables.desktop.history-tab %}
2. Right-click on the most recent commit and select **Amend commit**.
![Amend commit context menu](/assets/images/help/desktop/amend-commit-context-menu.png)
3. Click the **Summary** field to modify the commit message. Optionally, you can modify or add information about the commit in the **Description** field.
4. Select any uncommitted changes that you would like to add to the commit. For more information about selecting changes, see "[Committing and reviewing changes to your project](/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project#selecting-changes-to-include-in-a-commit)."
5. Once you have finalized your changes, click **Amend last commit**.
![Amend last commit overview](/assets/images/help/desktop/amend-last-commit-overview.png)

View File

@@ -0,0 +1,24 @@
---
title: Cherry-picking a commit
intro: You can pick a specific commit on one branch and copy the commit to another branch.
versions:
free-pro-team: '*'
redirect_from:
- /desktop/contributing-and-collaborating-using-github-desktop/cherry-picking-a-commit
---
## About Git cherry-pick
You can cherry-pick a commit on one branch to create a copy of the commit with the same changes on another branch. If you commit changes to the wrong branch or want to make the same changes to another branch, you can cherry-pick the commit to apply the changes to another branch. You can also use cherry-picking to apply specific changes before you are ready to create or merge a pull request. For example, if you commit a bug fix to a feature branch, you can cherry-pick the commit with the bug fix to other branches of your project.
You can also use cherry-picking when collaborating with a team. Some projects incorporate contributions by cherry-picking commits. For more information, see [Distributed Git - Maintaining a Project](https://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#_rebase_cherry_pick) in the Git documentation.
## Cherry-picking a commit
{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, click the branch that has the commit that you want to cherry-pick.
{% data reusables.desktop.history-tab %}
4. Drag the commit that you want to cherry-pick to the {% octicon "git-branch" aria-label="The branch icon" %} **Current Branch** menu and drop the commit on the branch that you want to copy the commit to.
![Dragging a commit to another branch in the Current Branch menu](/assets/images/help/desktop/cherry-picking.png)
## Further reading
- [git-cherry-pick](https://git-scm.com/docs/git-cherry-pick) in the Git documentation

Some files were not shown because too many files have changed in this diff Show More