1
0
mirror of synced 2026-01-25 18:03:26 -05:00

Merge pull request #36815 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2025-03-13 11:34:48 -07:00
committed by GitHub
11 changed files with 250 additions and 2 deletions

View File

@@ -67,6 +67,7 @@ jobs:
ci-formatted-job-name: ${{ matrix.ci_job.job }}
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
# Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=<PAT value>
attest: true
docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY'
secrets:
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
@@ -99,3 +100,4 @@ permissions:
contents: read
statuses: read
id-token: write
attestations: write

View File

@@ -16,7 +16,7 @@ on:
languages:
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
required: false
default: ''
default: 'en' # Temporary, only purge English on deploy. Set to empty string for all
permissions:
contents: read

View File

@@ -62,6 +62,10 @@ If users are experiencing errors when attempting to authenticate with SAML, see
{% ifversion ghec %}
## Conflicting SAML identity errors
{% data reusables.saml.conflicting-identity %}
## Further reading
* [AUTOTITLE](/admin/identity-and-access-management/provisioning-user-accounts-for-enterprise-managed-users/troubleshooting-team-membership-with-identity-provider-groups)

View File

@@ -0,0 +1,177 @@
---
title: Getting started with Git
intro: 'Learn the basics of Git by working through an example scenario.'
topics:
- Copilot
- Git
- Desktop
versions:
fpt: '*'
shortTitle: Get started with Git
---
Have you ever wished you had a time machine for your code? Well, Git is exactly that, and so much more!
If you aren't familiar with Git, it's a **version control** system that helps you keep track of changes to your code. You can save a snapshot of your project at a particular point in time, then make experimental changes without risking your work, since you can always go back to your snapshot.
{% data variables.product.github %} itself is a platform built around Git, letting you save your Git projects to the cloud and work on them with other developers.
While Git can be complicated, it's a powerful and necessary tool for any developer. This article will give you all the tools you need to use Git in your day-to-day workflow.
## Prerequisites
To follow this tutorial, you need to [install {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/download).
## Learning Git basics with {% data variables.product.prodname_desktop %}
For standard Git operations, we recommend {% data variables.product.prodname_desktop %}, an app that lets you interact with Git visually instead of through written commands. In this section, we'll learn how to use {% data variables.product.prodname_desktop %} to quickly perform the most common Git operations.
### Setting up {% data variables.product.prodname_desktop %}
If this is your first time using {% data variables.product.prodname_desktop %}, you need to install it and connect your {% data variables.product.github %} account.
1. [Download {% data variables.product.prodname_desktop %}](https://desktop.github.com/download/).
1. Open {% data variables.product.prodname_desktop %}, then click **Sign in to {% data variables.product.prodname_dotcom_the_website %}** and authorize {% data variables.product.prodname_desktop %} to access your account.
1. Back in {% data variables.product.prodname_desktop %}, click **Finish**. This will add your name and email from your {% data variables.product.github %} account to Git.
### Creating a local repository
Now, you can take your first steps into Git by creating a **repository**. Think of a repository as a project folder that tracks changes and stores history. First, we'll create a **local** repository:
1. In {% data variables.product.prodname_desktop %}, click **Create a New Repository on your Local Drive**.
1. Name the repository `learning-git`.
1. Select **Initialize this repository with a README** to create a blank `README.md` file automatically.
> [!TIP] It's standard practice to include a `README.md` file, also known as a README, in your projects. READMEs typically contain information that helps others understand, set up, and run your project.
1. Click **Create repository**.
### Creating a remote repository
The local repository you just created lives on your computer. Now, let's create a **remote** repository for the same project, which will be hosted on {% data variables.product.github %}. Linking a remote repository makes it easier to collaborate on and back up your work.
1. In {% data variables.product.prodname_desktop %}, click **Publish repository**.
1. In the pop up that appears, click **Publish repository** one more time.
1. To see your remote repository, click **View on {% data variables.product.github %}**.
### Setting up a space to make changes
Now that you've created a repository, let's talk about **branches**. Branches are essentially copies of your project where you can test changes without risking the stability of your existing work.
Repositories are automatically created with a `main` branch, which you can think of as the stable, primary version of your project. For example, in the repository for a website, the `main` branch corresponds to the site that visitors can see.
When you create a new branch, you're creating a safe space to work on a new feature without affecting the primary version. You and your collaborators can use different branches to work on multiple features at the same time.
Let's create a branch to work on changes in our repository:
1. In {% data variables.product.prodname_desktop %}, select the {% octicon "git-branch" aria-hidden="true" %} **Current Branch** dropdown menu, then click **New Branch**.
1. Name your new branch `readme-updates`, then click **Create Branch**.
### Saving snapshots of your project
To save your progress to your branch, you make a **commit**. A commit is a snapshot you take of your project at a particular point in time. You've actually already made your first commit: when you initialized your project with a README, {% data variables.product.prodname_desktop %} automatically created an initial commit to add the `README.md` file.
Whenever you complete a chunk of work that you want to save, you should make a commit. After you do, you can always go back to that point in time, no matter how many changes you make in the future.
1. In {% data variables.product.prodname_desktop %}, click **Open in {% data variables.product.prodname_vscode %}**.
1. In {% data variables.product.prodname_vscode_shortname %}, paste the following text into `README.md` and save your changes:
```markdown copy
Hello, World!
This is a demo project for learning how to use Git.
```
1. Back in {% data variables.product.prodname_desktop %}, you'll see the updates you just made to your README. In the bottom left, next to your {% data variables.product.github %} profile picture, type "Update README" in the text box. This is called a **commit message**, and it helps you keep track of the changes you make in each commit.
1. To make your commit, click **Commit to readme-updates**.
### Bringing your changes into your main branch
When you're happy with the changes you've made on a branch, you can publish your branch to the remote repository and create a **pull request**. Pull requests let you review a set of proposed changes, then merge them from one branch into another. In our case, we'll create a pull request that brings the changes we made in `readme-updates` into our original branch, `main`.
1. Click **Publish branch** to push the `readme-updates` branch with your changes to the remote repository.
1. To review your suggested changes, click **Preview Pull Request**.
1. Click **Create Pull Request**.
1. In the {% data variables.product.github %} window that appears, change your pull request title to "Add a message to the README", then write a brief description of your changes in the comment box.
1. Click **Create pull request**.
1. To bring your changes into the `main` branch, at the bottom of the page, click **Merge pull request**.
> [!NOTE] When you're working on a project with other developers, it's standard practice for someone else to review your pull request before it's merged.
1. Near the bottom of the page, click **Delete branch**. Deleting branches that have been merged into `main` helps keep your repository clean and easy to navigate.
### Preparing to make more changes
Congratulations on merging your first pull request! Now that you've successfully brought your changes into the `main` branch, there are a few steps you should take to get ready for your next round of changes:
1. In {% data variables.product.prodname_desktop %}, if you aren't on the `main` branch, select the {% octicon "git-branch" aria-hidden="true" %} **Current Branch** dropdown menu, then click **main**.
You should almost always switch back to the `main` branch before creating a new branch, since new branches are created as copies of the currently selected branch.
1. To check if any changes have been made to your remote `main` branch, click **Fetch origin**.
1. Finally, to update your local `main` branch with changes to the remote `main` branch, click **Pull origin**.
You now have all of the skills necessary for setting up and using Git on a project!
## Diving deeper into Git on the command line
{% data variables.product.prodname_desktop %} is designed to address your day-to-day Git needs. As you grow as a developer, you're likely to run into some unusual situations where you want more control over a Git operation, or you need to use more complex commands. In those instances, you'll need to switch to using written Git commands on the command line.
### Setting up your command line
Before you start working with the command line, you need to set up a few tools.
1. In {% data variables.product.prodname_desktop %}, press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open your project on the command line.
1. If you're using Windows, [install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). For macOS and Linux, Git is installed by default.
1. [Install the {% data variables.product.prodname_cli %}](https://github.com/cli/cli?tab=readme-ov-file#installation), which lets you perform {% data variables.product.github %}-related actions quickly from the command line.
1. To authenticate to {% data variables.product.github %} from the {% data variables.product.prodname_cli %}, run the following command:
```shell copy
gh auth login
```
Choose to authenticate with **{% data variables.product.prodname_dotcom_the_website %}**, then follow the on-screen prompts.
1. Install {% data variables.product.prodname_copilot_cli %}, a powerful extension for the {% data variables.product.prodname_cli %} that helps you find and understand commands, by running the following command:
```shell copy
gh extension install github/gh-copilot
```
### Experimenting with complex commands
Now that you're set up, let's learn how to find and understand the commands you might need in the future. For example, let's say you saw someone online mention `git blame`, but you don't know what it does. Try asking {% data variables.product.prodname_copilot_short %} to explain it with the following command:
```shell copy
gh copilot explain "git blame"
```
{% data variables.product.prodname_copilot_short %} will tell us that `git blame` provides a detailed history of a file, showing the author and commit that last modified each line in the file. Try it yourself with the following command:
```shell copy
git blame README.md
```
This is a great tool, but as you can imagine, the blame for a file can get really long. Let's say you're only interested in the most recent update to a specific line in a file. You can ask {% data variables.product.prodname_copilot_short %} to build you the right command:
```shell copy
gh copilot suggest "Show me the blame for line 1 of README.md"
```
When {% data variables.product.prodname_copilot_short %} asks what kind of command you're looking for, use your arrow keys to choose **git command**, then press <kbd>Enter</kbd>. {% data variables.product.prodname_copilot_short %} will then suggest the following command:
```shell copy
git blame -L 1,1 README.md
```
Use your arrow keys to choose **Execute command**, then press <kbd>Enter</kbd>. You'll see the author and commit that last modified line 1 of `README.md`.
## Review and next steps
In this article, we covered the basics of Git with {% data variables.product.prodname_desktop %}, learning important terms like:
* **Repository**: A folder that saves all of the changes made to files in your project.
* **Commit**: A snapshot of your project at a particular point in time.
* **Branch**: A copy of your project where you can work on a set of changes.
* **Pull request**: A request to merge changes from one branch into another.
We also talked about performing more complicated Git operations on the command line. We tried out `gh copilot explain` and `gh copilot suggest` to understand and find new commands and functionality.
Now, try applying what you've learned to your own work. Add Git to an existing project with {% data variables.product.prodname_desktop %} by pressing <kbd>Ctrl</kbd>+<kbd>O</kbd> (Windows/Linux) or <kbd>Command</kbd>+<kbd>O</kbd> (Mac) and experience the benefits of version control yourself!

View File

@@ -4,6 +4,7 @@ intro: "Learn how {% data variables.product.github %} can help while you're lear
versions:
fpt: '*'
children:
- /getting-started-with-git
- /finding-and-understanding-example-code
- /reusing-other-peoples-code-in-your-projects
- /learning-to-debug-with-github-copilot

View File

@@ -39,7 +39,11 @@ Typically, to do this in a Git-based workflow, you would:
* Let Git intelligently **merge** your specific changes back into the main copy of files, so that your changes don't impact other people's updates.
* Let Git **keep track** of your and other people's changes, so you all stay working on the most up-to-date version of the project.
{% ifversion fpt %}
To try using Git yourself, see [AUTOTITLE](/get-started/learning-to-code/getting-started-with-git).
{% else %}
If you want to learn more about Git, see [AUTOTITLE](/get-started/using-git/about-git).
{% endif %}
### How do Git and {% data variables.product.github %} work together?

View File

@@ -96,6 +96,10 @@ To confirm that a user's SCIM identity is created, we recommend testing this pro
If re-provisioning SCIM for users doesn't help, please contact {% data variables.product.prodname_dotcom %} Support.
## Conflicting SAML identity error
{% data reusables.saml.conflicting-identity %}
## Further reading
* [AUTOTITLE](/admin/identity-and-access-management/managing-iam-for-your-enterprise/troubleshooting-identity-and-access-management-for-your-enterprise)

View File

@@ -10,6 +10,7 @@
| {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_windows_terminal %} | {% octicon "check" aria-label="Included" %} |{% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_cli_short %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| Block suggestions matching public code | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_short %} code review ({% data variables.release-phases.public_preview %}) | "Review selection" in {% data variables.product.prodname_vscode_shortname %} only | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_for_prs %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_chat_short %} skills in IDEs[^3] | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| Exclude specified files from {% data variables.product.prodname_copilot_short %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |

View File

@@ -35,6 +35,7 @@ poetry | `pip` | v1 | {% octicon "check" aria-l
[pub](#pub) | `pub` | v2 | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% ifversion dependabot-updates-pub-private-registry %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Not supported" %}{% endif %} | {% ifversion dependabot-updates-pub-private-registry %}{% octicon "check" aria-label="Supported" %}{% else %}{% octicon "x" aria-label="Not supported" %}{% endif %} | {% octicon "x" aria-label="Not supported" %} |
[Swift](#swift) | `swift` | v5 | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} (git only) | {% octicon "x" aria-label="Not supported" %} |
[Terraform](#terraform) | `terraform` | >= 0.13, <= 1.10.x | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Not applicable |
uv | `uv` | Not applicable | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Not applicable |
[yarn](#yarn) | `npm` | v1, v2, v3 | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}|
> [!TIP]

View File

@@ -0,0 +1,53 @@
When users attempt to authenticate with your SAML identity provider (IdP) to access a {% data variables.product.github %} organization or enterprise for the first time, they may encounter the following error message.
> Your GitHub user account [GitHub username] is currently unlinked. However, you are attempting to authenticate with your Identity Provider using [IdP user account] SAML identity which is already linked to a different GitHub user account in the [organization/enterprise]. Please reach out to one of your GitHub [organization/enterprise] owners for assistance.
If the IdP is Entra ID, the error message will include the `User Object ID` of the linked identity in Entra ID, which {% data variables.product.github %} refers to as the `External ID`.
This error message occurs because an external identity can only be linked to a single {% data variables.product.github %} user account within an organization or enterprise.
### Identifying the user with a conflicting identity
When users contact you with this error, you can run through the following steps to identify the conflicting accounts.
1. Use the GitHub GraphQL API to determine which user is linked to the conflicting external identity.
* If SAML is configured at the GitHub **organization** level: an organization owner must query the existing external identities at the organization level and filter them by the SAML `NameID` of the IdP account that the user is authenticating with when this error occurs. See the [org-saml-identities-filtered-by-nameid-username.graphql](https://github.com/github/platform-samples/blob/master/graphql/queries/org-saml-identities-filtered-by-nameid-username.graphql) sample in the `platform-samples` repository.
* If SAML is configured at the GitHub **enterprise** level: an enterprise owner must query the existing external identities at the enterprise level and filter them by the SAML `NameID` of the IdP account that the user is authenticating with when this error occurs. See the [enterprise-saml-identities-filtered-by-nameid.graphql](https://github.com/github/platform-samples/blob/master/graphql/queries/enterprise-saml-identities-filtered-by-nameid.graphql) sample in the `platform-samples` repository.
1. If you identified a GitHub user associated with the conflicting external identity, to confirm if the user is still active in the enterprise and any organizations within it, an enterprise owner can follow the steps in [AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#viewing-members).
### Resolving the conflict
When you have followed the steps to identify conflicting accounts, there are various resolution options depending on your findings. If you encounter issues when attempting to follow these steps or have questions, you can open a GitHub support ticket using the {% ifversion ghes %}{% data variables.contact.enterprise_portal %}{% else %}{% data variables.contact.contact_support_portal %}{% endif %}.
* [Conflicting GitHub user no longer needs access](#conflicting-github-user-no-longer-needs-access)
* [Conflicting GitHub user still needs access](#conflicting-github-user-still-needs-access)
* [No conflicting GitHub user found](#no-conflicting-github-user-found)
#### Conflicting GitHub user no longer needs access
If there is a GitHub user account associated with the conflicting external identity that **no longer needs access** to the GitHub organization or enterprise, remove them as a member. If the user is removed properly, this should also remove their linked SAML identity, and linked SCIM identity if this exists at the organization level.
* If you **use SCIM provisioning** to manage organization membership, you must deprovision the user from your IdP via SCIM, rather than following the steps on GitHub. Otherwise, the user's linked SAML and SCIM identity will remain in the organization, which may continue to cause the error.
* If **don't use SCIM provisioning** to manage organization membership, see [AUTOTITLE](/organizations/managing-membership-in-your-organization/removing-a-member-from-your-organization) or [AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/removing-a-member-from-your-enterprise). Make sure to also remove the user's access from the GitHub app for the organization or enterprise in your IdP.
To confirm that a SAML or SCIM identity has been successfully removed from a GitHub organization for a user, see [AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management-for-your-organization#auditing-organization-members-on-github).
#### Conflicting GitHub user still needs access
If there is a GitHub user account associated with the conflicting external identity and this user **still needs access** to the organization or enterprise, you will need to either **change the linked identity** for the user account or have the user who is receiving the error **authenticate with a different IdP identity**.
* If you **use SCIM provisioning** to manage membership of an organization and you need to change the external identity that is linked to the member's GitHub account, deprovision then reprovision the user from your IdP (for example, unassign and reassign the user to the app).
* When the IdP user is deprovisioned, their GitHub account and linked SAML/SCIM identity will be removed from the GitHub organization.
* When the IdP user is reprovisioned to the GitHub organization, a new pending organization invitation and new unlinked SCIM identity will be created. This will allow the user to sign in with this GitHub user account, authenticate via SAML, and link the new IdP identity to their account. These steps will help ensure that both the new SAML and SCIM identity are properly linked to the GitHub user account in the organization.
* If you **don't use SCIM provisioning** to manage organization membership, or if SAML is configured at the enterprise level, you can revoke the linked external identity for the user by following the steps in one of the following articles:
* [AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise#viewing-and-revoking-a-linked-identity)
* [AUTOTITLE](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization#viewing-and-revoking-a-linked-identity)
#### No conflicting GitHub user found
If there is no GitHub user account associated with the conflicting external identity, you can revoke the external identity.
* If you **use SCIM provisioning** to manage membership of the organization, remove the stale, unlinked identity from your IdP (for example, unassign the user from the IdP app).
* If the IdP does not send the appropriate SCIM API call to GitHub, the identity will remain in the organization, which may continue to cause the error.
* To confirm that a SAML or SCIM identity has been successfully removed from a GitHub organization for a user, see [AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/troubleshooting-identity-and-access-management-for-your-organization#auditing-organization-members-on-github).
* If you **don't use SCIM provisioning** to manage membership of the organization, to revoke the linked external identity, navigate to one of the following URLs below to revoke the external identity. Replace `USERNAME` with the GitHub username of the user who cannot sign in, and `ORGANIZATION` or `ENTERPRISE` with the appropriate value.
* `https://github.com/orgs/ORGANIZATION/people/USERNAME/sso`
* `https://github.com/enterprises/ENTERPRISE/people/USERNAME/sso`

View File

@@ -767,7 +767,8 @@ function renderSearchGroups(
groups.push(<ActionList.Divider key="no-answer-divider" />)
}
if (showSpinner) {
// already showing spinner when streaming AI response, so don't want to show 2 here
if (showSpinner && !isInAskAIState) {
groups.push(
<Box
key="loading"