diff --git a/.github/workflows/first-responder-docs-content.yml b/.github/workflows/first-responder-docs-content.yml index a1ba7e7b9d..c46b365eb7 100644 --- a/.github/workflows/first-responder-docs-content.yml +++ b/.github/workflows/first-responder-docs-content.yml @@ -36,7 +36,7 @@ jobs: issue_number: issueNumber }) const teamMembers = await github.request( - `/orgs/github/teams/docs/members` + `/orgs/github/teams/docs/members?per_page=100` ) const logins = teamMembers.data.map(member => member.login) // ignore PRs opened by docs bot accounts diff --git a/.github/workflows/move-ready-to-merge-issues.yaml b/.github/workflows/move-ready-to-merge-issues.yaml index c3102b10a4..014822f0a0 100644 --- a/.github/workflows/move-ready-to-merge-issues.yaml +++ b/.github/workflows/move-ready-to-merge-issues.yaml @@ -5,7 +5,7 @@ name: Move and unlabel ready to merge issues # **Who does it impact**: Open source contributors, open-source maintainers. on: - pull_request: + pull_request_target: types: - labeled diff --git a/.github/workflows/openapi-decorate.yml b/.github/workflows/openapi-decorate.yml index 115d53e000..e720ebaef0 100644 --- a/.github/workflows/openapi-decorate.yml +++ b/.github/workflows/openapi-decorate.yml @@ -7,7 +7,6 @@ name: OpenAPI generate decorated schema files on: workflow_dispatch: pull_request: - types: [opened] jobs: generate-decorated-files: diff --git a/.github/workflows/triage-pull-requests.yml b/.github/workflows/triage-pull-requests.yml index 3ff6abcc5b..735b5e6a0d 100644 --- a/.github/workflows/triage-pull-requests.yml +++ b/.github/workflows/triage-pull-requests.yml @@ -5,7 +5,7 @@ name: Triage new pull requests # **Who does it impact**: on: - pull_request: + pull_request_target: types: - reopened - opened diff --git a/.github/workflows/triage-stale-check.yml b/.github/workflows/triage-stale-check.yml index 9d57c44065..c8d7f3d29c 100644 --- a/.github/workflows/triage-stale-check.yml +++ b/.github/workflows/triage-stale-check.yml @@ -21,7 +21,7 @@ jobs: days-before-pr-stale: 7 days-before-pr-close: 3 stale-pr-label: 'stale' - exempt-pr-labels: 'waiting for review' + exempt-pr-labels: 'waiting for review,never-stale' stale_staff: if: github.repository == 'github/docs' runs-on: ubuntu-latest @@ -40,3 +40,4 @@ jobs: # a comment being posted every 14 days as an infinite loop, which is what # we want stale-pr-label: 'waiting for review' + exempt-pr-labels: 'never-stale' diff --git a/.pa11yci b/.pa11yci index 0422428705..126bd542f4 100644 --- a/.pa11yci +++ b/.pa11yci @@ -13,17 +13,16 @@ "http://localhost:4001/en/actions", "http://localhost:4001/en/github/authenticating-to-github/creating-a-personal-access-token", "http://localhost:4001/en/github/authenticating-to-github/checking-for-existing-ssh-keys", - "http://localhost:4001/en/github/using-git/changing-a-remotes-url", + "http://localhost:4001/en/github/getting-started-with-github/managing-remote-repositories", "http://localhost:4001/en/github/getting-started-with-github/set-up-git", "http://localhost:4001/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository", "http://localhost:4001/en/github/writing-on-github/basic-writing-and-formatting-syntax", "http://localhost:4001/en/actions/reference/workflow-syntax-for-github-actions", - "http://localhost:4001/en/github/using-git/which-remote-url-should-i-use", + "http://localhost:4001/en/github/getting-started-with-github/about-remote-repositories", "http://localhost:4001/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line", - "http://localhost:4001/en/github/using-git/setting-your-username-in-git", + "http://localhost:4001/en/github/getting-started-with-github/setting-your-username-in-git", "http://localhost:4001/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address", "http://localhost:4001/en/github/authenticating-to-github/configuring-two-factor-authentication", - "http://localhost:4001/en/github/using-git/adding-a-remote", "http://localhost:4001/en/rest", "http://localhost:4001/en/github/working-with-github-pages/configuring-a-custom-domain-for-your-github-pages-site", "http://localhost:4001/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests", @@ -55,7 +54,7 @@ "http://localhost:4001/en/actions/getting-started-with-github-actions", "http://localhost:4001/en/actions/reference/events-that-trigger-workflows", "http://localhost:4001/en/desktop/getting-started-with-github-desktop/installing-github-desktop", - "http://localhost:4001/en/github/using-git/ignoring-files", + "http://localhost:4001/en/github/getting-started-with-github/ignoring-files", "http://localhost:4001/en/desktop", "http://localhost:4001/en/packages", "http://localhost:4001/en/actions/configuring-and-managing-workflows/configuring-a-workflow", @@ -71,7 +70,7 @@ "http://localhost:4001/en/actions/reference/context-and-expression-syntax-for-github-actions", "http://localhost:4001/en/github/managing-files-in-a-repository/navigating-code-on-github", "http://localhost:4001/en/github/teaching-and-learning-with-github-education/applying-for-a-student-developer-pack", - "http://localhost:4001/en/github/using-git/caching-your-github-credentials-in-git", + "http://localhost:4001/en/github/getting-started-with-github/caching-your-github-credentials-in-git", "http://localhost:4001/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request", "http://localhost:4001/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository", "http://localhost:4001/en/github/setting-up-and-managing-your-github-user-account/changing-your-github-username", @@ -81,7 +80,6 @@ "http://localhost:4001/en/actions/configuring-and-managing-workflows/using-environment-variables", "http://localhost:4001/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets", "http://localhost:4001/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository", - "http://localhost:4001/en/github/using-git/removing-a-remote", "http://localhost:4001/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line", "http://localhost:4001/en/github/setting-up-and-managing-billing-and-payments-on-github/setting-your-billing-email", "http://localhost:4001/en/github/setting-up-and-managing-your-github-user-account", @@ -90,8 +88,8 @@ "http://localhost:4001/en/github/authenticating-to-github/about-two-factor-authentication", "http://localhost:4001/en/github/working-with-github-pages/about-custom-domains-and-github-pages", "http://localhost:4001/en/github/searching-for-information-on-github/searching-code", - "http://localhost:4001/en/github/using-git/configuring-git-to-handle-line-endings", - "http://localhost:4001/en/github/using-git/getting-changes-from-a-remote-repository", + "http://localhost:4001/en/github/getting-started-with-github/configuring-git-to-handle-line-endings", + "http://localhost:4001/en/github/getting-started-with-github/getting-changes-from-a-remote-repository", "http://localhost:4001/en/github/authenticating-to-github/generating-a-new-gpg-key", "http://localhost:4001/en/github/authenticating-to-github/accessing-github-using-two-factor-authentication", "http://localhost:4001/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository", diff --git a/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md b/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md index 3890e3c0f6..47caefd3ae 100644 --- a/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md +++ b/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md @@ -44,4 +44,4 @@ You can change how a fork behaves with the upstream repository in {% data variab {% data reusables.desktop.select-fork-behavior %} ### Further reading -- [About remote repositories](/github/using-git/about-remote-repositories) +- [About remote repositories](/github/getting-started-with-github/about-remote-repositories) diff --git a/content/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch.md b/content/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch.md index f2a630cda3..74b6bb1546 100644 --- a/content/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch.md +++ b/content/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch.md @@ -15,7 +15,7 @@ When you pull to your local branch, you only update your local copy of the repos To add changes from one branch to another branch, you can merge the branches. To apply changes to your branch from another branch in the same repository, you can merge the other branch into your branch on {% data variables.product.prodname_desktop %}. To request that changes from your branch are merged into another branch, in the same repository or in another repository in the network, you can create a pull request on {% data variables.product.prodname_desktop %}. For more information, see "[Merging another branch into your project branch](#merging-another-branch-into-your-project-branch)" and "[About pull requests](/github/collaborating-with-issues-and-pull-requests/about-pull-requests)." -Some workflows require or benefit from rebasing instead of merging. By rebasing you can reorder, edit, or squash commits together. For more information, see "[About Git rebase](/articles/about-git-rebase)" and "[Rebasing your project branch onto another branch](#rebasing-your-project-branch-onto-another-branch)." +Some workflows require or benefit from rebasing instead of merging. By rebasing you can reorder, edit, or squash commits together. For more information, see "[About Git rebase](/github/getting-started-with-github/about-git-rebase)" and "[Rebasing your project branch onto another branch](#rebasing-your-project-branch-onto-another-branch)." ### Pulling to your local branch from the remote diff --git a/content/desktop/installing-and-configuring-github-desktop/about-connections-to-github.md b/content/desktop/installing-and-configuring-github-desktop/about-connections-to-github.md index c2d7b3c403..c258df302a 100644 --- a/content/desktop/installing-and-configuring-github-desktop/about-connections-to-github.md +++ b/content/desktop/installing-and-configuring-github-desktop/about-connections-to-github.md @@ -11,7 +11,7 @@ versions: After you authenticate to {% data variables.product.prodname_dotcom %}, you can connect to remote repositories with {% data variables.product.prodname_desktop %}. {% data variables.product.prodname_desktop %} caches your credentials (username and password or personal access token) and uses the credentials to authenticate for each connection to the remote repository. -{% data variables.product.prodname_desktop %} connects to {% data variables.product.prodname_dotcom %} using HTTPS. If you use {% data variables.product.prodname_desktop %} to access repositories that were cloned using SSH, you may encounter errors. To connect to a repository that was cloned using SSH, change the remote's URLs. For more information, see "[Changing a remote's URL](/github/using-git/changing-a-remotes-url)." +{% data variables.product.prodname_desktop %} connects to {% data variables.product.prodname_dotcom %} using HTTPS. If you use {% data variables.product.prodname_desktop %} to access repositories that were cloned using SSH, you may encounter errors. To connect to a repository that was cloned using SSH, change the remote's URLs. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." ### Further reading - "[Cloning and forking repositories from GitHub Desktop](/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)" diff --git a/content/desktop/installing-and-configuring-github-desktop/creating-your-first-repository-using-github-desktop.md b/content/desktop/installing-and-configuring-github-desktop/creating-your-first-repository-using-github-desktop.md index fc00f154bd..7227fb4c7d 100644 --- a/content/desktop/installing-and-configuring-github-desktop/creating-your-first-repository-using-github-desktop.md +++ b/content/desktop/installing-and-configuring-github-desktop/creating-your-first-repository-using-github-desktop.md @@ -42,7 +42,7 @@ If you do not wish to create and clone a tutorial repository, you can create a n - "Description" is an optional field that you can use to provide more information about the purpose of your repository. - "Local path" sets the location of your repository on your computer. By default, {% data variables.product.prodname_desktop %} creates a _GitHub_ folder inside your _Documents_ folder to store your repositories, but you can choose any location on your computer. Your new repository will be a folder inside the chosen location. For example, if you name your repository `Tutorial`, a folder named _Tutorial_ is created inside the folder you selected for your local path. {% data variables.product.prodname_desktop %} remembers your chosen location the next time you create or clone a new repository. - **Initialize this repository with a README** creates an initial commit with a _README.md_ file. READMEs helps people understand the purpose of your project, so we recommend selecting this and filling it out with helpful information. When someone visits your repository on {% data variables.product.product_name %}, the README is the first thing they'll see as they learn about your project. For more information, see "[About READMEs](/articles/about-readmes)." - - The **Git ignore** drop-down menu lets you add a custom file to ignore specific files in your local repository that you don't want to store in version control. If there's a specific language or framework that you'll be using, you can select an option from the available list. If you're just getting started, feel free to skip this selection. For more information, see "[Ignoring files](/articles/ignoring-files)." + - The **Git ignore** drop-down menu lets you add a custom file to ignore specific files in your local repository that you don't want to store in version control. If there's a specific language or framework that you'll be using, you can select an option from the available list. If you're just getting started, feel free to skip this selection. For more information, see "[Ignoring files](/github/getting-started-with-github/ignoring-files)." - The **License** drop-down menu lets you add an open-source license to a _LICENSE_ file in your repository. You don't need to worry about adding a license right away. For more information about available open-source licenses and how to add them to your repository, see "[Licensing a repository](/articles/licensing-a-repository)." 3. Click **Create repository**. @@ -107,6 +107,6 @@ Now that you've created and published your repository, you're ready to make chan You've now created a repository, published the repository to {% data variables.product.product_name %}, made a commit, and pushed your changes to {% data variables.product.product_name %}. You can follow this same workflow when contributing to other projects that you create or collaborate on. ### Further reading -- "[Learning about Git](/github/using-git/learning-about-git)" +- "[Getting started with Git](/github/getting-started-with-github/getting-started-with-git)" - "[Learning about {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/learning-about-github)" - "[Getting started with {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github)" diff --git a/content/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop.md b/content/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop.md index 49f5e18901..d61fcd36f4 100644 --- a/content/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop.md +++ b/content/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop.md @@ -13,7 +13,7 @@ This guide will help you get started with {% data variables.product.prodname_des You might find it helpful to have a basic understanding of Git and {% data variables.product.prodname_dotcom %} before getting started with {% data variables.product.prodname_desktop %}. For more information, see the following articles. -- "[Learning about Git](/github/using-git/learning-about-git)" +- "[Using Git](/github/getting-started-with-github/using-git)" - "[Learning about {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/learning-about-github)" - "[Getting started with {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github)" diff --git a/content/developers/apps/creating-ci-tests-with-the-checks-api.md b/content/developers/apps/creating-ci-tests-with-the-checks-api.md index 8d8bd1e520..f2bded6352 100644 --- a/content/developers/apps/creating-ci-tests-with-the-checks-api.md +++ b/content/developers/apps/creating-ci-tests-with-the-checks-api.md @@ -724,7 +724,7 @@ The RuboCop tool [offers](https://docs.rubocop.org/rubocop/usage/basic_usage.htm To push to a repository, your app must have write permissions for "Repository contents." You set that permission back in [Step 2.2. Cloning the repository](#step-22-cloning-the-repository) to **Read & write**, so you're all set. -In order to commit files, Git must know which [username](/articles/setting-your-username-in-git/) and [email](/articles/setting-your-commit-email-address-in-git/) to associate with the commit. Add two more environment variables in your `.env` file to store the name (`GITHUB_APP_USER_NAME`) and email (`GITHUB_APP_USER_EMAIL`) settings. Your name can be the name of your app and the email can be any email you'd like for this example. For example: +In order to commit files, Git must know which [username](/github/getting-started-with-github/setting-your-username-in-git/) and [email](/articles/setting-your-commit-email-address-in-git/) to associate with the commit. Add two more environment variables in your `.env` file to store the name (`GITHUB_APP_USER_NAME`) and email (`GITHUB_APP_USER_EMAIL`) settings. Your name can be the name of your app and the email can be any email you'd like for this example. For example: ```ini GITHUB_APP_USER_NAME=Octoapp diff --git a/content/developers/apps/setting-up-your-development-environment-to-create-a-github-app.md b/content/developers/apps/setting-up-your-development-environment-to-create-a-github-app.md index 6e4d57a597..476767139e 100644 --- a/content/developers/apps/setting-up-your-development-environment-to-create-a-github-app.md +++ b/content/developers/apps/setting-up-your-development-environment-to-create-a-github-app.md @@ -140,7 +140,7 @@ After you create your app, you'll be taken back to the [app settings page](https ### Step 4. Prepare the runtime environment -To keep your information secure, we recommend putting all your app-related secrets in your computer's memory where your app can find them, rather than putting them directly in your code. A handy development tool called [dotenv](https://github.com/bkeepers/dotenv) loads project-specific environment variables from a `.env` file to `ENV`. Never check your `.env` file into GitHub. This is a local file that stores sensitive information that you don't want on the public internet. The `.env` file is already included in the repository's [`.gitignore`](/articles/ignoring-files/) file to prevent that. +To keep your information secure, we recommend putting all your app-related secrets in your computer's memory where your app can find them, rather than putting them directly in your code. A handy development tool called [dotenv](https://github.com/bkeepers/dotenv) loads project-specific environment variables from a `.env` file to `ENV`. Never check your `.env` file into GitHub. This is a local file that stores sensitive information that you don't want on the public internet. The `.env` file is already included in the repository's [`.gitignore`](/github/getting-started-with-github/ignoring-files/) file to prevent that. The template code you downloaded in the [Prerequisites section](#prerequisites) already has an example file called `.env-example`. Rename the example file from `.env-example` to `.env` or create a copy of the `.env-example` file called `.env`. You haven't installed dotenv yet, but you will install it later in this quickstart when you run `bundle install`. **Note:** Quickstarts that reference the steps in this guide may include additional environment variables in the `.env-example` file. Reference the quickstart guide for the project you've cloned on GitHub for guidance setting those additional environment variables. diff --git a/content/education/manage-coursework-with-github-classroom/create-a-group-assignment.md b/content/education/manage-coursework-with-github-classroom/create-a-group-assignment.md index ed7b7515f6..45df283ef9 100644 --- a/content/education/manage-coursework-with-github-classroom/create-a-group-assignment.md +++ b/content/education/manage-coursework-with-github-classroom/create-a-group-assignment.md @@ -132,7 +132,7 @@ You can see the teams that are working on or have submitted an assignment in the ### Next steps -- After you create the assignment and your students form teams, team members can start work on the assignment using Git and {% data variables.product.product_name %}'s features. Students can clone the repository, push commits, manage branches, create and review pull requests, address merge conflicts, and discuss changes with issues. Both you and the team can review the commit history for the repository. For more information, see "[Getting started with {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github)," "[Creating, cloning, and archiving repositories](/github/creating-cloning-and-archiving-repositories)," "[Using Git](/github/using-git)," and "[Collaborating with issues and pull requests](/github/collaborating-with-issues-and-pull-requests)," and the free course on [managing merge conflicts](https://lab.github.com/githubtraining/managing-merge-conflicts) from {% data variables.product.prodname_learning %}. +- After you create the assignment and your students form teams, team members can start work on the assignment using Git and {% data variables.product.product_name %}'s features. Students can clone the repository, push commits, manage branches, create and review pull requests, address merge conflicts, and discuss changes with issues. Both you and the team can review the commit history for the repository. For more information, see "[Getting started with {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github)," "[Creating, cloning, and archiving repositories](/github/creating-cloning-and-archiving-repositories)," "[Using Git](/github/getting-started-with-github/using-git)," and "[Collaborating with issues and pull requests](/github/collaborating-with-issues-and-pull-requests)," and the free course on [managing merge conflicts](https://lab.github.com/githubtraining/managing-merge-conflicts) from {% data variables.product.prodname_learning %}. - When a team finishes an assignment, you can review the files in the repository, or you can review the history and visualizations for the repository to better understand how the team collaborated. For more information, see "[Visualizing repository data with graphs](/github/visualizing-repository-data-with-graphs)." diff --git a/content/education/manage-coursework-with-github-classroom/create-an-individual-assignment.md b/content/education/manage-coursework-with-github-classroom/create-an-individual-assignment.md index 42921e64fc..bb858246a9 100644 --- a/content/education/manage-coursework-with-github-classroom/create-an-individual-assignment.md +++ b/content/education/manage-coursework-with-github-classroom/create-an-individual-assignment.md @@ -112,7 +112,7 @@ You can see whether a student has joined the classroom and accepted or submitted ### Next steps -- Once you create the assignment, students can start work on the assignment using Git and {% data variables.product.product_name %}'s features. Students can clone the repository, push commits, manage branches, create and review pull requests, address merge conflicts, and discuss changes with issues. Both you and student can review the commit history for the repository. For more information, see "[Getting started with {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github)," "[Creating, cloning, and archiving repositories](/github/creating-cloning-and-archiving-repositories)," "[Using Git](/github/using-git)," and "[Collaborating with issues and pull requests](/github/collaborating-with-issues-and-pull-requests)." +- Once you create the assignment, students can start work on the assignment using Git and {% data variables.product.product_name %}'s features. Students can clone the repository, push commits, manage branches, create and review pull requests, address merge conflicts, and discuss changes with issues. Both you and student can review the commit history for the repository. For more information, see "[Getting started with {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github)," "[Creating, cloning, and archiving repositories](/github/creating-cloning-and-archiving-repositories)," "[Using Git](/github/getting-started-with-github/using-git)," and "[Collaborating with issues and pull requests](/github/collaborating-with-issues-and-pull-requests)." - When a student finishes an assignment, you can review the files in the repository, or you can review the history and visualizations for the repository to better understand the student's work. For more information, see "[Visualizing repository data with graphs](/github/visualizing-repository-data-with-graphs)." diff --git a/content/github/administering-a-repository/renaming-a-repository.md b/content/github/administering-a-repository/renaming-a-repository.md index 57638a77a7..c2d3a38c1d 100644 --- a/content/github/administering-a-repository/renaming-a-repository.md +++ b/content/github/administering-a-repository/renaming-a-repository.md @@ -25,7 +25,7 @@ In addition to redirecting web traffic, all `git clone`, `git fetch`, or `git pu $ git remote set-url origin new_url ``` -For more information, see "[Changing a Remote's URL](/github/using-git/changing-a-remotes-url)." +For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." {% if currentVersion == "free-pro-team@latest" %} diff --git a/content/github/administering-a-repository/transferring-a-repository.md b/content/github/administering-a-repository/transferring-a-repository.md index 94388ad8a4..34d3eff514 100644 --- a/content/github/administering-a-repository/transferring-a-repository.md +++ b/content/github/administering-a-repository/transferring-a-repository.md @@ -48,7 +48,7 @@ When you transfer a repository, its issues, pull requests, wiki, stars, and watc $ git remote set-url origin new_url ``` -For more information, see "[Changing a remote's URL](/articles/changing-a-remote-s-url)". +For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." #### Repository transfers and organizations diff --git a/content/github/administering-a-repository/troubleshooting-required-status-checks.md b/content/github/administering-a-repository/troubleshooting-required-status-checks.md index 3424fb27b7..06da317419 100644 --- a/content/github/administering-a-repository/troubleshooting-required-status-checks.md +++ b/content/github/administering-a-repository/troubleshooting-required-status-checks.md @@ -16,7 +16,7 @@ After you enable required status checks, your branch may need to be up-to-date w {% note %} -**Note:** You can also bring your branch up to date with the base branch using Git rebase. For more information, see "[About Git rebase](/github/using-git/about-git-rebase)." +**Note:** You can also bring your branch up to date with the base branch using Git rebase. For more information, see "[About Git rebase](/github/getting-started-with-github/about-git-rebase)." {% endnote %} diff --git a/content/github/authenticating-to-github/about-authentication-to-github.md b/content/github/authenticating-to-github/about-authentication-to-github.md index 1f3dad6026..d1394cd349 100644 --- a/content/github/authenticating-to-github/about-authentication-to-github.md +++ b/content/github/authenticating-to-github/about-authentication-to-github.md @@ -48,9 +48,9 @@ You can authenticate with the API in different ways. ### Authenticating with the command line -You can access repositories on {% data variables.product.product_name %} from the command line in two ways, HTTPS and SSH, and both have a different way of authenticating. The method of authenticating is determined based on whether you choose an HTTPS or SSH remote URL when you clone the repository. For more information about which way to access, see "[Which remote URL should I use?](/github/using-git/which-remote-url-should-i-use)" +You can access repositories on {% data variables.product.product_name %} from the command line in two ways, HTTPS and SSH, and both have a different way of authenticating. The method of authenticating is determined based on whether you choose an HTTPS or SSH remote URL when you clone the repository. For more information about which way to access, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." -* You can work with all repositories on {% data variables.product.product_name %} over HTTPS, even if you are behind a firewall or proxy. Every time you use Git to authenticate with {% data variables.product.product_name %}, you'll be prompted to enter your credentials to authenticate with {% data variables.product.product_name %}, unless you cache them with a [credential helper](/github/using-git/caching-your-github-credentials-in-git). {% data reusables.user_settings.password-authentication-deprecation %} +* You can work with all repositories on {% data variables.product.product_name %} over HTTPS, even if you are behind a firewall or proxy. Every time you use Git to authenticate with {% data variables.product.product_name %}, you'll be prompted to enter your credentials to authenticate with {% data variables.product.product_name %}, unless you cache them with a [credential helper](/github/getting-started-with-github/caching-your-github-credentials-in-git). {% data reusables.user_settings.password-authentication-deprecation %} * You can work with all repositories on {% data variables.product.product_name %} over SSH, although firewalls and proxys might refuse to allow SSH connections. Using SSH requires you to generate an SSH public/private keypair on your local machine and add the public key to your {% data variables.product.product_name %} account. Every time you use Git to authenticate with {% data variables.product.product_name %}, you'll be prompted to enter your SSH key passphrase, unless you've [stored the key](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent). For more information, see "[Generating a new SSH key and adding it to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)." diff --git a/content/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account.md b/content/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account.md index 0638c2432f..23fb2d23e7 100644 --- a/content/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account.md +++ b/content/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account.md @@ -15,7 +15,7 @@ Before adding a new SSH key to your {% data variables.product.product_name %} ac * [Checked for existing SSH keys](/articles/checking-for-existing-ssh-keys) * [Generated a new SSH key and added it to the ssh-agent](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) -After adding a new SSH key to your {% data variables.product.product_name %} account, you can reconfigure any local repositories to use SSH. For more information, see "[Switching remote URLs from HTTPS to SSH](/articles/changing-a-remote-s-url/#switching-remote-urls-from-https-to-ssh)." +After adding a new SSH key to your {% data variables.product.product_name %} account, you can reconfigure any local repositories to use SSH. For more information, see "[Switching remote URLs from HTTPS to SSH](/github/getting-started-with-github/managing-remote-repositories/#switching-remote-urls-from-https-to-ssh)." {% data reusables.ssh.dsa-support %} diff --git a/content/github/authenticating-to-github/creating-a-personal-access-token.md b/content/github/authenticating-to-github/creating-a-personal-access-token.md index 2340dc5433..d2740e4668 100644 --- a/content/github/authenticating-to-github/creating-a-personal-access-token.md +++ b/content/github/authenticating-to-github/creating-a-personal-access-token.md @@ -54,7 +54,7 @@ Personal access tokens (PATs) are an alternative to using passwords for authenti {% data reusables.command_line.providing-token-as-password %} -Personal access tokens can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to [switch the remote from SSH to HTTPS](/articles/changing-a-remote-s-url/#switching-remote-urls-from-ssh-to-https). +Personal access tokens can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to [switch the remote from SSH to HTTPS](/github/getting-started-with-github/managing-remote-repositories/#switching-remote-urls-from-ssh-to-https). If you are not prompted for your username and password, your credentials may be cached on your computer. You can [update your credentials in the Keychain](/articles/updating-credentials-from-the-osx-keychain) to replace your old password with the token. diff --git a/content/github/authenticating-to-github/creating-a-strong-password.md b/content/github/authenticating-to-github/creating-a-strong-password.md index db2e968ad7..11fb184df2 100644 --- a/content/github/authenticating-to-github/creating-a-strong-password.md +++ b/content/github/authenticating-to-github/creating-a-strong-password.md @@ -30,5 +30,5 @@ You can only use your password to log on to {% data variables.product.product_na ### Further reading -- "[Caching your {% data variables.product.product_name %} credentials in Git](/github/using-git/caching-your-github-credentials-in-git/)" +- "[Caching your {% data variables.product.product_name %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git/)" - "[Keeping your account and data secure](/articles/keeping-your-account-and-data-secure/)" diff --git a/content/github/authenticating-to-github/error-bad-file-number.md b/content/github/authenticating-to-github/error-bad-file-number.md index c652063f74..861245fea3 100644 --- a/content/github/authenticating-to-github/error-bad-file-number.md +++ b/content/github/authenticating-to-github/error-bad-file-number.md @@ -26,7 +26,7 @@ $ ssh -vT git@{% data variables.command_line.codeblock %} #### Use HTTPS -Often, the simplest solution is to simply avoid SSH entirely. Most firewalls and proxies allow HTTPS traffic without issue. To take advantage of this, change [the remote URL](/articles/which-remote-url-should-i-use) you're using: +Often, the simplest solution is to simply avoid SSH entirely. Most firewalls and proxies allow HTTPS traffic without issue. To take advantage of this, change [the remote URL](/github/getting-started-with-github/about-remote-repositories) you're using: ```shell $ git clone https://{% data variables.command_line.codeblock %}/username/reponame.git diff --git a/content/github/authenticating-to-github/error-permission-denied-publickey.md b/content/github/authenticating-to-github/error-permission-denied-publickey.md index 6c57fec292..e3c077d63a 100644 --- a/content/github/authenticating-to-github/error-permission-denied-publickey.md +++ b/content/github/authenticating-to-github/error-permission-denied-publickey.md @@ -40,7 +40,7 @@ All connections, including those for remote URLs, must be made as the "git" user $ ssh -T GITHUB-USERNAME@{% data variables.command_line.codeblock %} > Permission denied (publickey). ``` -If your connection failed and you're using a remote URL with your {% data variables.product.product_name %} username, you can [change the remote URL to use the "git" user](/articles/changing-a-remote-s-url/). +If your connection failed and you're using a remote URL with your {% data variables.product.product_name %} username, you can [change the remote URL to use the "git" user](/github/getting-started-with-github/managing-remote-repositories). You should verify your connection by typing: diff --git a/content/github/authenticating-to-github/recovering-your-ssh-key-passphrase.md b/content/github/authenticating-to-github/recovering-your-ssh-key-passphrase.md index e5bc1c00c6..a8df3eccab 100644 --- a/content/github/authenticating-to-github/recovering-your-ssh-key-passphrase.md +++ b/content/github/authenticating-to-github/recovering-your-ssh-key-passphrase.md @@ -30,12 +30,12 @@ If you [configured your SSH passphrase with the OS X Keychain](/articles/working {% windows %} -If you lose your SSH key passphrase, there's no way to recover it. You'll need to [generate a brand new SSH keypair](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [switch to HTTPS cloning](/articles/changing-a-remote-s-url/#switching-remote-urls-from-ssh-to-https) so you can use your GitHub password instead. +If you lose your SSH key passphrase, there's no way to recover it. You'll need to [generate a brand new SSH keypair](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [switch to HTTPS cloning](/github/getting-started-with-github/managing-remote-repositories) so you can use your GitHub password instead. {% endwindows %} {% linux %} -If you lose your SSH key passphrase, there's no way to recover it. You'll need to [generate a brand new SSH keypair](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [switch to HTTPS cloning](/articles/which-remote-url-should-i-use/#cloning-with-https-urls) so you can use your GitHub password instead. +If you lose your SSH key passphrase, there's no way to recover it. You'll need to [generate a brand new SSH keypair](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) or [switch to HTTPS cloning](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls) so you can use your GitHub password instead. {% endlinux %} diff --git a/content/github/authenticating-to-github/using-ssh-over-the-https-port.md b/content/github/authenticating-to-github/using-ssh-over-the-https-port.md index 05f7043e78..3acbcec275 100644 --- a/content/github/authenticating-to-github/using-ssh-over-the-https-port.md +++ b/content/github/authenticating-to-github/using-ssh-over-the-https-port.md @@ -1,6 +1,6 @@ --- title: Using SSH over the HTTPS port -intro: 'Sometimes, firewalls refuse to allow SSH connections entirely. If using [HTTPS cloning with credential caching](/github/using-git/caching-your-github-credentials-in-git) is not an option, you can attempt to clone using an SSH connection made over the HTTPS port. Most firewall rules should allow this, but proxy servers may interfere.' +intro: 'Sometimes, firewalls refuse to allow SSH connections entirely. If using [HTTPS cloning with credential caching](/github/getting-started-with-github/caching-your-github-credentials-in-git) is not an option, you can attempt to clone using an SSH connection made over the HTTPS port. Most firewall rules should allow this, but proxy servers may interfere.' redirect_from: - /articles/using-ssh-over-the-https-port versions: diff --git a/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md b/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md index f97a0aa9fb..519a7bff79 100644 --- a/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md +++ b/content/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line.md @@ -70,7 +70,7 @@ For example, if you and another person both edited the file _styleguide.md_ on t $ git commit -m "Resolved merge conflict by incorporating both suggestions." ``` -You can now merge the branches on the command line or [push your changes to your remote repository](/articles/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request. +You can now merge the branches on the command line or [push your changes to your remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request. ### Removed file merge conflicts @@ -119,7 +119,7 @@ For example, if you edited a file, such as *README.md*, and another person remov > [branch-d 6f89e49] Merge branch 'branch-c' into branch-d ``` -You can now merge the branches on the command line or [push your changes to your remote repository](/articles/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request. +You can now merge the branches on the command line or [push your changes to your remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request. ### Further reading diff --git a/content/github/collaborating-with-issues-and-pull-requests/syncing-a-fork.md b/content/github/collaborating-with-issues-and-pull-requests/syncing-a-fork.md index 941f9b9da1..939b9a7cb2 100644 --- a/content/github/collaborating-with-issues-and-pull-requests/syncing-a-fork.md +++ b/content/github/collaborating-with-issues-and-pull-requests/syncing-a-fork.md @@ -51,6 +51,6 @@ Before you can sync your fork with an upstream repository, you must [configure a {% tip %} -**Tip**: Syncing your fork only updates your local copy of the repository. To update your fork on {% data variables.product.product_location %}, you must [push your changes](/articles/pushing-commits-to-a-remote-repository/). +**Tip**: Syncing your fork only updates your local copy of the repository. To update your fork on {% data variables.product.product_location %}, you must [push your changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/). {% endtip %} diff --git a/content/github/committing-changes-to-your-project/about-commits.md b/content/github/committing-changes-to-your-project/about-commits.md index 66cf2c5610..79279ed864 100644 --- a/content/github/committing-changes-to-your-project/about-commits.md +++ b/content/github/committing-changes-to-your-project/about-commits.md @@ -19,7 +19,7 @@ You can add a co-author on any commits you collaborate on. For more information, {% if currentVersion == "free-pro-team@latest" %} You can also create a commit on behalf of an organization. For more information, see "[Creating a commit on behalf of an organization](/github/committing-changes-to-your-project/creating-a-commit-on-behalf-of-an-organization)."{% endif %} -Rebasing allows you to change a series of commits and can modify the order of the commits in your timeline. For more information, see "[About git rebase](/github/using-git/about-git-rebase)." +Rebasing allows you to change a series of commits and can modify the order of the commits in your timeline. For more information, see "[About git rebase](/github/getting-started-with-github/about-git-rebase)." ### Further reading - "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#about-commits)" on {% data variables.product.prodname_desktop %} diff --git a/content/github/committing-changes-to-your-project/creating-a-commit-on-behalf-of-an-organization.md b/content/github/committing-changes-to-your-project/creating-a-commit-on-behalf-of-an-organization.md index 6d49572ebd..9ae01f8c1a 100644 --- a/content/github/committing-changes-to-your-project/creating-a-commit-on-behalf-of-an-organization.md +++ b/content/github/committing-changes-to-your-project/creating-a-commit-on-behalf-of-an-organization.md @@ -47,7 +47,7 @@ Organization's can use the `name@organization.com` email as a public point of co on-behalf-of: @org <name@organization.com>" ``` -The new commit, message, and badge will appear on {% data variables.product.product_location %} the next time you push. For more information, see "[Pushing changes to a remote repository](/articles/pushing-commits-to-a-remote-repository/)." +The new commit, message, and badge will appear on {% data variables.product.product_location %} the next time you push. For more information, see "[Pushing changes to a remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)." ### Creating commits with an `on-behalf-of` badge on {% data variables.product.product_name %} diff --git a/content/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors.md b/content/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors.md index 475a356cd9..39f0dd37df 100644 --- a/content/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors.md +++ b/content/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors.md @@ -62,7 +62,7 @@ You can use {% data variables.product.prodname_desktop %} to create a commit wit Co-authored-by: another-name <another-name@example.com>" ``` -The new commit and message will appear on {% data variables.product.product_location %} the next time you push. For more information, see "[Pushing changes to a remote repository](/articles/pushing-commits-to-a-remote-repository/)." +The new commit and message will appear on {% data variables.product.product_location %} the next time you push. For more information, see "[Pushing changes to a remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/)." ### Creating co-authored commits on {% data variables.product.product_name %} diff --git a/content/github/creating-cloning-and-archiving-repositories/cloning-a-repository.md b/content/github/creating-cloning-and-archiving-repositories/cloning-a-repository.md index 8014777ecb..ddd5164277 100644 --- a/content/github/creating-cloning-and-archiving-repositories/cloning-a-repository.md +++ b/content/github/creating-cloning-and-archiving-repositories/cloning-a-repository.md @@ -15,7 +15,7 @@ topics: You can clone a repository from {% data variables.product.product_location %} to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from {% data variables.product.product_location %} to your local machine. -Cloning a repository pulls down a full copy of all the repository data that {% data variables.product.product_location %} has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on {% data variables.product.product_location %}, or pull other people's changes from {% data variables.product.product_location %}. For more information, see "[Using common Git commands](/github/using-git/using-common-git-commands)". +Cloning a repository pulls down a full copy of all the repository data that {% data variables.product.product_location %} has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on {% data variables.product.product_location %}, or pull other people's changes from {% data variables.product.product_location %}. For more information, see "[Using Git](/github/getting-started-with-github/using-git)". You can clone your existing repository or clone another person's existing repository to contribute to a project. diff --git a/content/github/creating-cloning-and-archiving-repositories/creating-a-new-repository.md b/content/github/creating-cloning-and-archiving-repositories/creating-a-new-repository.md index bdf453d842..e6504de48e 100644 --- a/content/github/creating-cloning-and-archiving-repositories/creating-a-new-repository.md +++ b/content/github/creating-cloning-and-archiving-repositories/creating-a-new-repository.md @@ -42,7 +42,7 @@ topics: {% data reusables.repositories.choose-repo-visibility %} 6. If you're not using a template, there are a number of optional items you can pre-populate your repository with. If you're importing an existing repository to {% data variables.product.product_name %}, don't choose any of these options, as you may introduce a merge conflict. You can add or create new files using the user interface or choose to add new files using the command line later. For more information, see "[Importing a Git repository using the command line](/articles/importing-a-git-repository-using-the-command-line/)," "[Adding a file to a repository using the command line](/articles/adding-a-file-to-a-repository-using-the-command-line)," and "[Addressing merge conflicts](/articles/addressing-merge-conflicts/)." - You can create a README, which is a document describing your project. For more information, see "[About READMEs](/articles/about-readmes/)." - - You can create a *.gitignore* file, which is a set of ignore rules. For more information, see "[Ignoring files](/articles/ignoring-files)."{% if currentVersion == "free-pro-team@latest" %} + - You can create a *.gitignore* file, which is a set of ignore rules. For more information, see "[Ignoring files](/github/getting-started-with-github/ignoring-files)."{% if currentVersion == "free-pro-team@latest" %} - You can choose to add a software license for your project. For more information, see "[Licensing a repository](/articles/licensing-a-repository)."{% endif %} {% data reusables.repositories.select-marketplace-apps %} {% data reusables.repositories.create-repo %} diff --git a/content/github/creating-cloning-and-archiving-repositories/error-repository-not-found.md b/content/github/creating-cloning-and-archiving-repositories/error-repository-not-found.md index b5a1a1591d..4754cfb3d8 100644 --- a/content/github/creating-cloning-and-archiving-repositories/error-repository-not-found.md +++ b/content/github/creating-cloning-and-archiving-repositories/error-repository-not-found.md @@ -17,7 +17,7 @@ Typos happen, and repository names are case-sensitive. If you try to clone `git To avoid this error, when cloning, always copy and paste the clone URL from the repository's page. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." -To update the remote on an existing repository, see "[Changing a remote's URL](/articles/changing-a-remote-s-url)". +To update the remote on an existing repository, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)". ### Checking your permissions diff --git a/content/github/creating-cloning-and-archiving-repositories/https-cloning-errors.md b/content/github/creating-cloning-and-archiving-repositories/https-cloning-errors.md index 8c1b1a9b6a..87eaa13422 100644 --- a/content/github/creating-cloning-and-archiving-repositories/https-cloning-errors.md +++ b/content/github/creating-cloning-and-archiving-repositories/https-cloning-errors.md @@ -75,10 +75,10 @@ When prompted for a username and password, make sure you use an account that has {% tip %} -**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/using-git/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail. +**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/getting-started-with-github/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail. {% endtip %} ### Use SSH instead -If you've previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see "[Which remote URL should I use?](/articles/which-remote-url-should-i-use)" +If you've previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." diff --git a/content/github/extending-github/git-automation-with-oauth-tokens.md b/content/github/extending-github/git-automation-with-oauth-tokens.md index 9f34b49250..1e73a1d797 100644 --- a/content/github/extending-github/git-automation-with-oauth-tokens.md +++ b/content/github/extending-github/git-automation-with-oauth-tokens.md @@ -33,7 +33,7 @@ Create a personal access token on your application settings page. For more infor {% data reusables.command_line.providing-token-as-password %} -To avoid these prompts, you can use Git password caching. For information, see "[Caching your GitHub credentials in Git](/github/using-git/caching-your-github-credentials-in-git)." +To avoid these prompts, you can use Git password caching. For information, see "[Caching your GitHub credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git)." {% warning %} diff --git a/content/github/using-git/about-git-rebase.md b/content/github/getting-started-with-github/about-git-rebase.md similarity index 95% rename from content/github/using-git/about-git-rebase.md rename to content/github/getting-started-with-github/about-git-rebase.md index 83cdd80be5..3323e06c49 100644 --- a/content/github/using-git/about-git-rebase.md +++ b/content/github/getting-started-with-github/about-git-rebase.md @@ -4,6 +4,7 @@ redirect_from: - /rebase/ - articles/interactive-rebase/ - /articles/about-git-rebase + - /github/using-git/about-git-rebase intro: 'The `git rebase` command allows you to easily change a series of commits, modifying the history of your repository. You can reorder, edit, or squash commits together.' versions: free-pro-team: '*' @@ -67,7 +68,7 @@ There are six commands available while rebasing: ### An example of using `git rebase` -No matter which command you use, Git will launch [your default text editor](/articles/associating-text-editors-with-git) and open a file that details the commits in the range you've chosen. That file looks something like this: +No matter which command you use, Git will launch [your default text editor](/github/getting-started-with-github/associating-text-editors-with-git) and open a file that details the commits in the range you've chosen. That file looks something like this: ``` pick 1fc6c95 Patch A diff --git a/content/github/using-git/about-git-subtree-merges.md b/content/github/getting-started-with-github/about-git-subtree-merges.md similarity index 97% rename from content/github/using-git/about-git-subtree-merges.md rename to content/github/getting-started-with-github/about-git-subtree-merges.md index 57a827365e..888102374c 100644 --- a/content/github/using-git/about-git-subtree-merges.md +++ b/content/github/getting-started-with-github/about-git-subtree-merges.md @@ -4,6 +4,7 @@ redirect_from: - /articles/working-with-subtree-merge/ - /subtree-merge/ - /articles/about-git-subtree-merges + - /github/using-git/about-git-subtree-merges intro: 'If you need to manage multiple projects within a single repository, you can use a *subtree merge* to handle all the references.' versions: free-pro-team: '*' @@ -85,7 +86,7 @@ Although we've only added one subproject, any number of subprojects can be incor {% tip %} -**Tip**: If you create a fresh clone of the repository in the future, the remotes you've added will not be created for you. You will have to add them again using [the `git remote add` command](/articles/adding-a-remote). +**Tip**: If you create a fresh clone of the repository in the future, the remotes you've added will not be created for you. You will have to add them again using [the `git remote add` command](/github/getting-started-with-github/managing-remote-repositories). {% endtip %} diff --git a/content/github/using-git/which-remote-url-should-i-use.md b/content/github/getting-started-with-github/about-remote-repositories.md similarity index 71% rename from content/github/using-git/which-remote-url-should-i-use.md rename to content/github/getting-started-with-github/about-remote-repositories.md index e1c964b718..7e276841f8 100644 --- a/content/github/using-git/which-remote-url-should-i-use.md +++ b/content/github/getting-started-with-github/about-remote-repositories.md @@ -1,18 +1,51 @@ --- -title: Which remote URL should I use? +title: About remote repositories redirect_from: + - /articles/working-when-github-goes-down/ + - /articles/sharing-repositories-without-github/ + - /articles/about-remote-repositories - /articles/which-url-should-i-use/ - /articles/which-remote-url-should-i-use -intro: 'There are several ways to clone repositories available on {% data variables.product.product_location %}.' + - /github/using-git/which-remote-url-should-i-use + - /github/using-git/about-remote-repositories +intro: 'GitHub''s collaborative approach to development depends on publishing commits from your local repository to {% data variables.product.product_name %} for other people to view, fetch, and update.' versions: free-pro-team: '*' enterprise-server: '*' github-ae: '*' --- -When you view a repository while signed in to your account, the URLs you can use to clone the project onto your computer are available below the repository details: +### About remote repositories -For information on setting or changing your remote URL, see "[Changing a remote's URL](/articles/changing-a-remote-s-url)." +A remote URL is Git's fancy way of saying "the place where your code is stored." That URL could be your repository on GitHub, or another user's fork, or even on a completely different server. + +You can only push to two types of URL addresses: + +* An HTTPS URL like `https://{% data variables.command_line.backticks %}/user/repo.git` +* An SSH URL, like `git@{% data variables.command_line.backticks %}:user/repo.git` + +Git associates a remote URL with a name, and your default remote is usually called `origin`. + +### Creating remote repositories + +You can use the `git remote add` command to match a remote URL with a name. +For example, you'd type the following in the command line: + +```shell +git remote add origin <REMOTE_URL> +``` + +This associates the name `origin` with the `REMOTE_URL`. + +You can use the command `git remote set-url` to [change a remote's URL](/github/getting-started-with-github/managing-remote-repositories). + +### Choosing a URL for your remote repository + +There are several ways to clone repositories available on {% data variables.product.product_location %}. + +When you view a repository while signed in to your account, the URLs you can use to clone the project onto your computer are available below the repository details. + +For information on setting or changing your remote URL, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." ### Cloning with HTTPS URLs @@ -25,9 +58,7 @@ When you `git clone`, `git fetch`, `git pull`, or `git push` to a remote reposit {% tip %} **Tips**: - -- You can use a credential helper so Git will remember your {% data variables.product.prodname_dotcom %} credentials every time it talks to {% data variables.product.prodname_dotcom %}. For more information, see "[Caching your {% data variables.product.prodname_dotcom %} credentials in Git](/github/using-git/caching-your-github-credentials-in-git)." - +- You can use a credential helper so Git will remember your {% data variables.product.prodname_dotcom %} credentials every time it talks to {% data variables.product.prodname_dotcom %}. For more information, see "[Caching your {% data variables.product.prodname_dotcom %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git)." - To clone a repository without authenticating to {% data variables.product.product_name %} on the command line, you can use {% data variables.product.prodname_desktop %} to clone instead. For more information, see "[Cloning a repository from {% data variables.product.prodname_dotcom %} to {% data variables.product.prodname_dotcom %} Desktop](/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop)." {% endtip %} @@ -63,7 +94,3 @@ You can also use a [Subversion](https://subversion.apache.org/) client to access You can also access repositories on {% data variables.product.prodname_dotcom %} from Subversion clients. For more information, see "[Support for Subversion clients](/github/importing-your-projects-to-github/support-for-subversion-clients)." {% endif %} - -### Further reading - -- [Working with Remotes](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) from the _Pro Git_ book site diff --git a/content/github/using-git/associating-text-editors-with-git.md b/content/github/getting-started-with-github/associating-text-editors-with-git.md similarity index 98% rename from content/github/using-git/associating-text-editors-with-git.md rename to content/github/getting-started-with-github/associating-text-editors-with-git.md index dbde6b4d31..bbc77327a4 100644 --- a/content/github/using-git/associating-text-editors-with-git.md +++ b/content/github/getting-started-with-github/associating-text-editors-with-git.md @@ -6,6 +6,7 @@ redirect_from: - /articles/using-textmate-as-your-default-editor/ - /articles/using-sublime-text-2-as-your-default-editor/ - /articles/associating-text-editors-with-git + - /github/using-git/associating-text-editors-with-git versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/using-git/caching-your-github-credentials-in-git.md b/content/github/getting-started-with-github/caching-your-github-credentials-in-git.md similarity index 94% rename from content/github/using-git/caching-your-github-credentials-in-git.md rename to content/github/getting-started-with-github/caching-your-github-credentials-in-git.md index cf1e88cd49..86be620d51 100644 --- a/content/github/using-git/caching-your-github-credentials-in-git.md +++ b/content/github/getting-started-with-github/caching-your-github-credentials-in-git.md @@ -4,7 +4,8 @@ redirect_from: - /firewalls-and-proxies/ - /articles/caching-your-github-password-in-git - /github/using-git/caching-your-github-password-in-git -intro: 'If you''re [cloning {% data variables.product.product_name %} repositories using HTTPS](/github/using-git/which-remote-url-should-i-use), you can use a credential helper to tell Git to remember your credentials.' + - /github/using-git/caching-your-github-credentials-in-git +intro: 'If you''re [cloning {% data variables.product.product_name %} repositories using HTTPS](/github/getting-started-with-github/about-remote-repositories), you can use a credential helper to tell Git to remember your credentials.' versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/using-git/configuring-git-to-handle-line-endings.md b/content/github/getting-started-with-github/configuring-git-to-handle-line-endings.md similarity index 98% rename from content/github/using-git/configuring-git-to-handle-line-endings.md rename to content/github/getting-started-with-github/configuring-git-to-handle-line-endings.md index 0c4740c740..4ac09d82dd 100644 --- a/content/github/using-git/configuring-git-to-handle-line-endings.md +++ b/content/github/getting-started-with-github/configuring-git-to-handle-line-endings.md @@ -6,6 +6,7 @@ redirect_from: - /line-endings/ - /articles/dealing-with-line-endings/ - /articles/configuring-git-to-handle-line-endings + - /github/using-git/configuring-git-to-handle-line-endings versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/using-git/dealing-with-non-fast-forward-errors.md b/content/github/getting-started-with-github/dealing-with-non-fast-forward-errors.md similarity index 83% rename from content/github/using-git/dealing-with-non-fast-forward-errors.md rename to content/github/getting-started-with-github/dealing-with-non-fast-forward-errors.md index e1ed31f144..e746ade789 100644 --- a/content/github/using-git/dealing-with-non-fast-forward-errors.md +++ b/content/github/getting-started-with-github/dealing-with-non-fast-forward-errors.md @@ -3,6 +3,7 @@ title: Dealing with non-fast-forward errors intro: 'Sometimes, Git can''t make your change to a remote repository without losing commits. When this happens, your push is refused.' redirect_from: - /articles/dealing-with-non-fast-forward-errors + - /github/using-git/dealing-with-non-fast-forward-errors versions: free-pro-team: '*' enterprise-server: '*' @@ -21,7 +22,7 @@ $ git push origin main > 'Note about fast-forwards' section of 'git push --help' for details. ``` -You can fix this by [fetching and merging](/articles/getting-changes-from-a-remote-repository) the changes made on the remote branch with the changes that you have made locally: +You can fix this by [fetching and merging](/github/getting-started-with-github/getting-changes-from-a-remote-repository) the changes made on the remote branch with the changes that you have made locally: ```shell $ git fetch origin diff --git a/content/github/using-git/getting-changes-from-a-remote-repository.md b/content/github/getting-started-with-github/getting-changes-from-a-remote-repository.md similarity index 74% rename from content/github/using-git/getting-changes-from-a-remote-repository.md rename to content/github/getting-started-with-github/getting-changes-from-a-remote-repository.md index 5512fda33b..871f4f1d16 100644 --- a/content/github/using-git/getting-changes-from-a-remote-repository.md +++ b/content/github/getting-started-with-github/getting-changes-from-a-remote-repository.md @@ -4,12 +4,13 @@ intro: You can use common Git commands to access remote repositories. redirect_from: - /articles/fetching-a-remote/ - /articles/getting-changes-from-a-remote-repository + - /github/using-git/getting-changes-from-a-remote-repository versions: free-pro-team: '*' enterprise-server: '*' github-ae: '*' --- -These commands are very useful when interacting with [a remote repository](/articles/about-remote-repositories). `clone` and `fetch` download remote code from a repository's remote URL to your local computer, `merge` is used to merge different people's work together with yours, and `pull` is a combination of `fetch` and `merge`. +These commands are very useful when interacting with [a remote repository](/github/getting-started-with-github/about-remote-repositories). `clone` and `fetch` download remote code from a repository's remote URL to your local computer, `merge` is used to merge different people's work together with yours, and `pull` is a combination of `fetch` and `merge`. ### Cloning a repository @@ -20,7 +21,7 @@ $ git clone https://{% data variables.command_line.codeblock %}/USERNAMEremotename # Fetches updates made to a remote repository ``` -Otherwise, you can always [add a new remote](/articles/adding-a-remote) -and then fetch. +Otherwise, you can always add a new remote and then fetch. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." ### Merging changes into your local branch diff --git a/content/github/using-git/getting-started-with-git-and-github.md b/content/github/getting-started-with-github/getting-started-with-git.md similarity index 51% rename from content/github/using-git/getting-started-with-git-and-github.md rename to content/github/getting-started-with-github/getting-started-with-git.md index 416697aea3..621b181b4c 100644 --- a/content/github/using-git/getting-started-with-git-and-github.md +++ b/content/github/getting-started-with-github/getting-started-with-git.md @@ -1,9 +1,12 @@ --- -title: Getting started with Git and GitHub +title: Getting started with Git intro: '' mapTopic: true redirect_from: - /articles/getting-started-with-git-and-github + - /github/using-git/getting-started-with-git-and-github + - /github/using-git/learning-about-git + - /articles/learning-about-git versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/using-git/git-workflows.md b/content/github/getting-started-with-github/git-workflows.md similarity index 95% rename from content/github/using-git/git-workflows.md rename to content/github/getting-started-with-github/git-workflows.md index 6c781948b8..62eb598c16 100644 --- a/content/github/using-git/git-workflows.md +++ b/content/github/getting-started-with-github/git-workflows.md @@ -4,6 +4,7 @@ intro: '{% data variables.product.prodname_dotcom %} flow is a lightweight, bran redirect_from: - /articles/what-is-a-good-git-workflow/ - /articles/git-workflows + - /github/using-git/git-workflows versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/using-git/ignoring-files.md b/content/github/getting-started-with-github/ignoring-files.md similarity index 98% rename from content/github/using-git/ignoring-files.md rename to content/github/getting-started-with-github/ignoring-files.md index bca201ffd3..b3587ed5f9 100644 --- a/content/github/using-git/ignoring-files.md +++ b/content/github/getting-started-with-github/ignoring-files.md @@ -4,6 +4,7 @@ redirect_from: - /git-ignore/ - /ignore-files/ - /articles/ignoring-files + - /github/using-git/ignoring-files intro: 'You can configure Git to ignore files you don''t want to check in to {% data variables.product.product_name %}.' versions: free-pro-team: '*' diff --git a/content/github/getting-started-with-github/index.md b/content/github/getting-started-with-github/index.md index 184a5a0296..24344719ea 100644 --- a/content/github/getting-started-with-github/index.md +++ b/content/github/getting-started-with-github/index.md @@ -12,6 +12,9 @@ redirect_from: - /categories/53/articles/ - /categories/setup/ - /categories/getting-started-with-github + - /categories/19/articles/ + - /categories/using-git + - /github/using-git versions: free-pro-team: '*' enterprise-server: '*' @@ -68,7 +71,6 @@ topics: {% link_in_list /access-permissions-on-github %} {% link_in_list /faq-about-changes-to-githubs-plans %} - {% topic_link_in_list /signing-up-for-github %} {% link_in_list /signing-up-for-a-new-github-account %} {% link_in_list /verifying-your-email-address %} @@ -89,4 +91,25 @@ topics: {% link_in_list /saving-repositories-with-stars %} {% link_in_list /following-people %} +{% topic_link_in_list /getting-started-with-git %} + {% link_in_list /setting-your-username-in-git %} + {% link_in_list /caching-your-github-credentials-in-git %} + {% link_in_list /why-is-git-always-asking-for-my-password %} + {% link_in_list /updating-credentials-from-the-macos-keychain %} + {% link_in_list /git-workflows %} + {% link_in_list /about-remote-repositories %} + {% link_in_list /managing-remote-repositories %} + {% link_in_list /associating-text-editors-with-git %} + {% link_in_list /configuring-git-to-handle-line-endings %} + {% link_in_list /ignoring-files %} + +{% topic_link_in_list /using-git %} + {% link_in_list /pushing-commits-to-a-remote-repository %} + {% link_in_list /getting-changes-from-a-remote-repository %} + {% link_in_list /dealing-with-non-fast-forward-errors %} + {% link_in_list /splitting-a-subfolder-out-into-a-new-repository %} + {% link_in_list /about-git-subtree-merges %} + {% link_in_list /about-git-rebase %} + {% link_in_list /using-git-rebase-on-the-command-line %} + {% link_in_list /resolving-merge-conflicts-after-a-git-rebase %} diff --git a/content/github/getting-started-with-github/managing-remote-repositories.md b/content/github/getting-started-with-github/managing-remote-repositories.md new file mode 100644 index 0000000000..b1a9ebe7e8 --- /dev/null +++ b/content/github/getting-started-with-github/managing-remote-repositories.md @@ -0,0 +1,234 @@ +--- +title: Managing remote repositories +intro: 'Learn to work with your local repositories on your computer and remote repositories hosted on {% data variables.product.product_name %}.' +redirect_from: + - /categories/18/articles/ + - /remotes/ + - /categories/managing-remotes/ + - /articles/managing-remote-repositories + - /articles/adding-a-remote + - /github/using-git/adding-a-remote + - /articles/changing-a-remote-s-url + - /articles/changing-a-remotes-url + - /github/using-git/changing-a-remotes-url + - /articles/renaming-a-remote + - /github/using-git/renaming-a-remote + - /articles/removing-a-remote + - /github/using-git/removing-a-remote + - /github/using-git/managing-remote-repositories +versions: + free-pro-team: '*' + enterprise-server: '*' + github-ae: '*' +--- + +### Adding a remote repository + +To add a new remote, use the `git remote add` command on the terminal, in the directory your repository is stored at. + +The `git remote add` command takes two arguments: +* A remote name, for example, `origin` +* A remote URL, for example, `https://{% data variables.command_line.backticks %}/user/repo.git` + +For example: + +```shell +$ git remote add origin https://{% data variables.command_line.codeblock %}/user/repo.git +# Set a new remote + +$ git remote -v +# Verify new remote +> origin https://{% data variables.command_line.codeblock %}/user/repo.git (fetch) +> origin https://{% data variables.command_line.codeblock %}/user/repo.git (push) +``` + +For more information on which URL to use, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." + +#### Troubleshooting: Remote origin already exists + +This error means you've tried to add a remote with a name that already exists in your local repository. + +```shell +$ git remote add origin https://{% data variables.command_line.codeblock %}/octocat/Spoon-Knife.git +> fatal: remote origin already exists. +``` + +To fix this, you can: +* Use a different name for the new remote +* Rename the existing remote repository +* Delete the existing remote repository + +### Changing a remote repository's URL + +The `git remote set-url` command changes an existing remote repository URL. + +{% tip %} + +**Tip:** For information on the difference between HTTPS and SSH URLs, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." + +{% endtip %} + +The `git remote set-url` command takes two arguments: + +* An existing remote name. For example, `origin` or `upstream` are two common choices. +* A new URL for the remote. For example: + * If you're updating to use HTTPS, your URL might look like: +```shell +https://{% data variables.command_line.backticks %}/USERNAME/REPOSITORY.git +``` + * If you're updating to use SSH, your URL might look like: +```shell +git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git +``` + +#### Switching remote URLs from SSH to HTTPS + +{% data reusables.command_line.open_the_multi_os_terminal %} +2. Change the current working directory to your local project. +3. List your existing remotes in order to get the name of the remote you want to change. + ```shell + $ git remote -v + > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (fetch) + > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (push) + ``` +4. Change your remote's URL from SSH to HTTPS with the `git remote set-url` command. + ```shell + $ git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git + ``` +5. Verify that the remote URL has changed. + ```shell + $ git remote -v + # Verify new remote URL + > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch) + > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push) + ``` + +The next time you `git fetch`, `git pull`, or `git push` to the remote repository, you'll be asked for your GitHub username and password. {% data reusables.user_settings.password-authentication-deprecation %} + +You can [use a credential helper](/github/getting-started-with-github/caching-your-github-credentials-in-git) so Git will remember your GitHub username and personal access token every time it talks to GitHub. + +#### Switching remote URLs from HTTPS to SSH + +{% data reusables.command_line.open_the_multi_os_terminal %} +2. Change the current working directory to your local project. +3. List your existing remotes in order to get the name of the remote you want to change. + ```shell + $ git remote -v + > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch) + > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push) + ``` +4. Change your remote's URL from HTTPS to SSH with the `git remote set-url` command. + ```shell + $ git remote set-url origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git + ``` +5. Verify that the remote URL has changed. + ```shell + $ git remote -v + # Verify new remote URL + > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (fetch) + > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (push) + ``` + +#### Troubleshooting: No such remote '[name]' + +This error means that the remote you tried to change doesn't exist: + +```shell +$ git remote set-url sofake https://{% data variables.command_line.codeblock %}/octocat/Spoon-Knife +> fatal: No such remote 'sofake' +``` + +Check that you've correctly typed the remote name. + +### Renaming a remote repository + +Use the `git remote rename` command to rename an existing remote. + +The `git remote rename` command takes two arguments: +* An existing remote name, for example, `origin` +* A new name for the remote, for example, `destination` + +### Example + +These examples assume you're [cloning using HTTPS](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls), which is recommended. + +```shell +$ git remote -v +# View existing remotes +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) + +$ git remote rename origin destination +# Change remote name from 'origin' to 'destination' + +$ git remote -v +# Verify remote's new name +> destination https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) +> destination https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) +``` + +#### Troubleshooting: Could not rename config section 'remote.[old name]' to 'remote.[new name]' + +This error means that the remote you tried the old remote name you typed doesn't exist. + +You can check which remotes currently exist with the `git remote -v` command: + +```shell +$ git remote -v +# View existing remotes +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) +``` + +#### Troubleshooting: Remote [new name] already exists + +This error means that the remote name you want to use already exists. To solve this, either use a different remote name, or rename the original remote. + +### Removing a remote repository + +Use the `git remote rm` command to remove a remote URL from your repository. + +The `git remote rm` command takes one argument: +* A remote name, for example, `destination` + +### Example + +These examples assume you're [cloning using HTTPS](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls), which is recommended. + +```shell +$ git remote -v +# View current remotes +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) +> destination https://{% data variables.command_line.codeblock %}/FORKER/REPOSITORY.git (fetch) +> destination https://{% data variables.command_line.codeblock %}/FORKER/REPOSITORY.git (push) + +$ git remote rm destination +# Remove remote +$ git remote -v +# Verify it's gone +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) +> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) +``` + +{% warning %} + +**Note**: `git remote rm` does not delete the remote repository from the server. It simply +removes the remote and its references from your local repository. + +{% endwarning %} + +#### Troubleshooting: Could not remove config section 'remote.[name]' + +This error means that the remote you tried to delete doesn't exist: + +```shell +$ git remote rm sofake +> error: Could not remove config section 'remote.sofake' +``` + +Check that you've correctly typed the remote name. + +### Further reading + +- "[Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) diff --git a/content/github/using-git/pushing-commits-to-a-remote-repository.md b/content/github/getting-started-with-github/pushing-commits-to-a-remote-repository.md similarity index 94% rename from content/github/using-git/pushing-commits-to-a-remote-repository.md rename to content/github/getting-started-with-github/pushing-commits-to-a-remote-repository.md index d92003f955..064b44cd89 100644 --- a/content/github/using-git/pushing-commits-to-a-remote-repository.md +++ b/content/github/getting-started-with-github/pushing-commits-to-a-remote-repository.md @@ -4,6 +4,7 @@ intro: Use `git push` to push commits made on your local branch to a remote repo redirect_from: - /articles/pushing-to-a-remote/ - /articles/pushing-commits-to-a-remote-repository + - /github/using-git/pushing-commits-to-a-remote-repository versions: free-pro-team: '*' enterprise-server: '*' @@ -42,7 +43,7 @@ repository you're pushing to, you'll get a message saying `non-fast-forward upda This means that you must retrieve, or "fetch," the upstream changes, before you are able to push your local changes. -For more information on this error, see "[Dealing with non-fast-forward errors](/articles/dealing-with-non-fast-forward-errors)." +For more information on this error, see "[Dealing with non-fast-forward errors](/github/getting-started-with-github/dealing-with-non-fast-forward-errors)." ### Pushing tags @@ -110,5 +111,5 @@ For more information on working with forks, see "[Syncing a fork](/articles/sync - [The "Remotes" chapter from the "Pro Git" book](https://git-scm.com/book/ch5-2.html) - [`git remote` man page](https://git-scm.com/docs/git-remote.html) - "[Git cheatsheet](/articles/git-cheatsheet)" -- "[Git workflows](/articles/git-workflows)" +- "[Git workflows](/github/getting-started-with-github/git-workflows)" - "[Git Handbook](https://guides.github.com/introduction/git-handbook/)" diff --git a/content/github/using-git/resolving-merge-conflicts-after-a-git-rebase.md b/content/github/getting-started-with-github/resolving-merge-conflicts-after-a-git-rebase.md similarity index 96% rename from content/github/using-git/resolving-merge-conflicts-after-a-git-rebase.md rename to content/github/getting-started-with-github/resolving-merge-conflicts-after-a-git-rebase.md index f50d74b9c6..ccfc85651c 100644 --- a/content/github/using-git/resolving-merge-conflicts-after-a-git-rebase.md +++ b/content/github/getting-started-with-github/resolving-merge-conflicts-after-a-git-rebase.md @@ -3,6 +3,7 @@ title: Resolving merge conflicts after a Git rebase intro: 'When you perform a `git rebase` operation, you''re typically moving commits around. Because of this, you might get into a situation where a merge conflict is introduced. That means that two of your commits modified the same line in the same file, and Git doesn''t know which change to apply.' redirect_from: - /articles/resolving-merge-conflicts-after-a-git-rebase + - /github/using-git/resolving-merge-conflicts-after-a-git-rebase versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/getting-started-with-github/set-up-git.md b/content/github/getting-started-with-github/set-up-git.md index e96c3b8490..d9061874ec 100644 --- a/content/github/getting-started-with-github/set-up-git.md +++ b/content/github/getting-started-with-github/set-up-git.md @@ -36,7 +36,7 @@ If you don't need to work with files locally, {% data variables.product.product_ ### Setting up Git 1. [Download and install the latest version of Git](https://git-scm.com/downloads). -2. [Set your username in Git](/articles/setting-your-username-in-git). +2. [Set your username in Git](/github/getting-started-with-github/setting-your-username-in-git). 3. [Set your commit email address in Git](/articles/setting-your-commit-email-address). ### Next steps: Authenticating with {% data variables.product.prodname_dotcom %} from Git @@ -45,11 +45,11 @@ When you connect to a {% data variables.product.product_name %} repository from #### Connecting over HTTPS (recommended) -If you [clone with HTTPS](/articles/which-remote-url-should-i-use/#cloning-with-https-urls), you can [cache your {% data variables.product.prodname_dotcom %} credentials in Git](/github/using-git/caching-your-github-credentials-in-git) using a credential helper. +If you [clone with HTTPS](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls), you can [cache your {% data variables.product.prodname_dotcom %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git) using a credential helper. #### Connecting over SSH -If you [clone with SSH](/articles/which-remote-url-should-i-use#cloning-with-ssh-urls), you must [generate SSH keys](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) on each computer you use to push or pull from {% data variables.product.product_name %}. +If you [clone with SSH](/github/getting-started-with-github/about-remote-repositories/#cloning-with-ssh-urls), you must [generate SSH keys](/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) on each computer you use to push or pull from {% data variables.product.product_name %}. ### Celebrate diff --git a/content/github/using-git/setting-your-username-in-git.md b/content/github/getting-started-with-github/setting-your-username-in-git.md similarity index 97% rename from content/github/using-git/setting-your-username-in-git.md rename to content/github/getting-started-with-github/setting-your-username-in-git.md index fc69247e3e..1219a0a3c6 100644 --- a/content/github/using-git/setting-your-username-in-git.md +++ b/content/github/getting-started-with-github/setting-your-username-in-git.md @@ -3,6 +3,7 @@ title: Setting your username in Git intro: 'Git uses a username to associate commits with an identity. The Git username is not the same as your {% data variables.product.product_name %} username.' redirect_from: - /articles/setting-your-username-in-git + - /github/using-git/setting-your-username-in-git versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/github/using-git/splitting-a-subfolder-out-into-a-new-repository.md b/content/github/getting-started-with-github/splitting-a-subfolder-out-into-a-new-repository.md similarity index 95% rename from content/github/using-git/splitting-a-subfolder-out-into-a-new-repository.md rename to content/github/getting-started-with-github/splitting-a-subfolder-out-into-a-new-repository.md index 328f9b2f7c..679e712223 100644 --- a/content/github/using-git/splitting-a-subfolder-out-into-a-new-repository.md +++ b/content/github/getting-started-with-github/splitting-a-subfolder-out-into-a-new-repository.md @@ -3,6 +3,7 @@ title: Splitting a subfolder out into a new repository redirect_from: - /articles/splitting-a-subpath-out-into-a-new-repository/ - /articles/splitting-a-subfolder-out-into-a-new-repository + - /github/using-git/splitting-a-subfolder-out-into-a-new-repository intro: You can turn a folder within a Git repository into a brand new repository. versions: free-pro-team: '*' @@ -49,7 +50,7 @@ If you create a new clone of the repository, you won't lose any of your Git hist {% tip %} - **Tip:** For information on the difference between HTTPS and SSH URLs, see "[Which remote URL should I use?](/articles/which-remote-url-should-i-use)" + **Tip:** For information on the difference between HTTPS and SSH URLs, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." {% endtip %} diff --git a/content/github/using-git/updating-credentials-from-the-macos-keychain.md b/content/github/getting-started-with-github/updating-credentials-from-the-macos-keychain.md similarity index 91% rename from content/github/using-git/updating-credentials-from-the-macos-keychain.md rename to content/github/getting-started-with-github/updating-credentials-from-the-macos-keychain.md index f126ccd8c9..0ce8530e26 100644 --- a/content/github/using-git/updating-credentials-from-the-macos-keychain.md +++ b/content/github/getting-started-with-github/updating-credentials-from-the-macos-keychain.md @@ -4,6 +4,7 @@ intro: 'You''ll need to update your saved credentials in the `git-credential-osx redirect_from: - /articles/updating-credentials-from-the-osx-keychain - /github/using-git/updating-credentials-from-the-osx-keychain + - /github/using-git/updating-credentials-from-the-macos-keychain versions: free-pro-team: '*' enterprise-server: '*' @@ -35,4 +36,4 @@ If it's successful, nothing will print out. To test that it works, try and clone ### Further reading -- "[Caching your {% data variables.product.prodname_dotcom %} credentials in Git](/github/using-git/caching-your-github-credentials-in-git/)" +- "[Caching your {% data variables.product.prodname_dotcom %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git/)" diff --git a/content/github/using-git/using-git-rebase-on-the-command-line.md b/content/github/getting-started-with-github/using-git-rebase-on-the-command-line.md similarity index 96% rename from content/github/using-git/using-git-rebase-on-the-command-line.md rename to content/github/getting-started-with-github/using-git-rebase-on-the-command-line.md index 5aa0a1d0cc..d15d610b6b 100644 --- a/content/github/using-git/using-git-rebase-on-the-command-line.md +++ b/content/github/getting-started-with-github/using-git-rebase-on-the-command-line.md @@ -3,6 +3,7 @@ title: Using Git rebase on the command line redirect_from: - /articles/using-git-rebase/ - /articles/using-git-rebase-on-the-command-line + - /github/using-git/using-git-rebase-on-the-command-line intro: Here's a short tutorial on using `git rebase` on the command line. versions: free-pro-team: '*' @@ -139,4 +140,4 @@ Force pushing has serious implications because it changes the historical sequenc ### Further reading -* "[Resolving merge conflicts after a Git rebase](/articles/resolving-merge-conflicts-after-a-git-rebase)" +* "[Resolving merge conflicts after a Git rebase](/github/getting-started-with-github/resolving-merge-conflicts-after-a-git-rebase)" diff --git a/content/github/using-git/using-advanced-git-commands.md b/content/github/getting-started-with-github/using-git.md similarity index 63% rename from content/github/using-git/using-advanced-git-commands.md rename to content/github/getting-started-with-github/using-git.md index 5a89791356..423861a87c 100644 --- a/content/github/using-git/using-advanced-git-commands.md +++ b/content/github/getting-started-with-github/using-git.md @@ -1,8 +1,11 @@ --- -title: Using advanced Git commands +title: Using Git intro: '' mapTopic: true redirect_from: + - /articles/using-common-git-commands + - /github/using-git/using-common-git-commands + - /github/using-git/using-advanced-git-commands - /categories/52/articles/ - /categories/advanced-git/ - /articles/using-advanced-git-commands @@ -12,4 +15,3 @@ versions: enterprise-server: '*' github-ae: '*' --- - diff --git a/content/github/using-git/why-is-git-always-asking-for-my-password.md b/content/github/getting-started-with-github/why-is-git-always-asking-for-my-password.md similarity index 64% rename from content/github/using-git/why-is-git-always-asking-for-my-password.md rename to content/github/getting-started-with-github/why-is-git-always-asking-for-my-password.md index 6049357736..f28ed7db1f 100644 --- a/content/github/using-git/why-is-git-always-asking-for-my-password.md +++ b/content/github/getting-started-with-github/why-is-git-always-asking-for-my-password.md @@ -3,6 +3,7 @@ title: Why is Git always asking for my password? intro: 'If Git prompts you for a username and password every time you try to interact with GitHub, you''re probably using the HTTPS clone URL for your repository.' redirect_from: - /articles/why-is-git-always-asking-for-my-password + - /github/using-git/why-is-git-always-asking-for-my-password versions: free-pro-team: '*' enterprise-server: '*' @@ -13,10 +14,10 @@ Using an HTTPS remote URL has some advantages compared with using SSH. It's easi {% data reusables.user_settings.password-authentication-deprecation %} -You can avoid being prompted for your password by configuring Git to [cache your credentials](/github/using-git/caching-your-github-credentials-in-git) for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS. +You can avoid being prompted for your password by configuring Git to [cache your credentials](/github/getting-started-with-github/caching-your-github-credentials-in-git) for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS. ### Further reading -* "[Which remote URL should I use](/articles/which-remote-url-should-i-use/#cloning-with-https-urls)" -* "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)" -* "[Adding your SSH key to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)" +- "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)." +- "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)" +- "[Adding your SSH key to the ssh-agent](/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)" diff --git a/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md b/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md index d4d8512eee..ecdc4b5bff 100644 --- a/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md +++ b/content/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line.md @@ -41,14 +41,14 @@ versions: ``` 7. At the top of your {% data variables.product.product_name %} repository's Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL.  -8. In Terminal, [add the URL for the remote repository](/articles/adding-a-remote) where your local repository will be pushed. +8. In Terminal, [add the URL for the remote repository](/github/getting-started-with-github/managing-remote-repositories) where your local repository will be pushed. ```shell $ git remote add origin <REMOTE_URL> # Sets the new remote $ git remote -v # Verifies the new remote URL ``` -9. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. +9. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. ```shell $ git push -u origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin @@ -78,14 +78,14 @@ versions: ``` 7. At the top of your {% data variables.product.product_name %} repository's Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL.  -8. In the Command prompt, [add the URL for the remote repository](/articles/adding-a-remote) where your local repository will be pushed. +8. In the Command prompt, [add the URL for the remote repository](/github/getting-started-with-github/managing-remote-repositories) where your local repository will be pushed. ```shell $ git remote add origin <REMOTE_URL> # Sets the new remote $ git remote -v # Verifies the new remote URL ``` -9. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. +9. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. ```shell $ git push origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin @@ -115,14 +115,14 @@ versions: ``` 7. At the top of your {% data variables.product.product_name %} repository's Quick Setup page, click {% octicon "clippy" aria-label="The copy to clipboard icon" %} to copy the remote repository URL.  -8. In Terminal, [add the URL for the remote repository](/articles/adding-a-remote) where your local repository will be pushed. +8. In Terminal, [add the URL for the remote repository](/github/getting-started-with-github/managing-remote-repositories) where your local repository will be pushed. ```shell $ git remote add origin <REMOTE_URL> # Sets the new remote $ git remote -v # Verifies the new remote URL ``` -9. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. +9. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. ```shell $ git push origin main # Pushes the changes in your local repository up to the remote repository you specified as the origin diff --git a/content/github/importing-your-projects-to-github/source-code-migration-tools.md b/content/github/importing-your-projects-to-github/source-code-migration-tools.md index b27dd34443..c5538f000d 100644 --- a/content/github/importing-your-projects-to-github/source-code-migration-tools.md +++ b/content/github/importing-your-projects-to-github/source-code-migration-tools.md @@ -41,7 +41,7 @@ We recommend these tools for moving changes between Team Foundation Server and G {% tip %} -**Tip:** After you've successfully converted your project to Git, you can [push it to {% data variables.product.prodname_dotcom %}](/articles/pushing-commits-to-a-remote-repository/). +**Tip:** After you've successfully converted your project to Git, you can [push it to {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/). {% endtip %} diff --git a/content/github/importing-your-projects-to-github/what-are-the-differences-between-subversion-and-git.md b/content/github/importing-your-projects-to-github/what-are-the-differences-between-subversion-and-git.md index d679071d48..0bc715b525 100644 --- a/content/github/importing-your-projects-to-github/what-are-the-differences-between-subversion-and-git.md +++ b/content/github/importing-your-projects-to-github/what-are-the-differences-between-subversion-and-git.md @@ -51,7 +51,7 @@ For more information, see “[Git Tools Submodules](https://git-scm.com/book/en/ ### Preserving history -SVN is configured to assume that the history of a project never changes. Git allows you to modify previous commits and changes using tools like [`git rebase`](/articles/about-git-rebase). +SVN is configured to assume that the history of a project never changes. Git allows you to modify previous commits and changes using tools like [`git rebase`](/github/getting-started-with-github/about-git-rebase). {% tip %} diff --git a/content/github/index.md b/content/github/index.md index 964825aa17..14021d4f1c 100644 --- a/content/github/index.md +++ b/content/github/index.md @@ -31,8 +31,6 @@ versions: {% link_in_list /creating-cloning-and-archiving-repositories %} -{% link_in_list /using-git %} - {% link_in_list /committing-changes-to-your-project %} {% link_in_list /collaborating-with-issues-and-pull-requests %} diff --git a/content/github/setting-up-and-managing-organizations-and-teams/renaming-an-organization.md b/content/github/setting-up-and-managing-organizations-and-teams/renaming-an-organization.md index 05a0ab0685..9a63d45940 100644 --- a/content/github/setting-up-and-managing-organizations-and-teams/renaming-an-organization.md +++ b/content/github/setting-up-and-managing-organizations-and-teams/renaming-an-organization.md @@ -26,7 +26,7 @@ After changing your organization's name, your old organization name becomes avai #### Changes that occur automatically - {% data variables.product.prodname_dotcom %} automatically redirects references to your repositories. Web links to your organization's existing **repositories** will continue to work. This can take a few minutes to complete after you initiate the change. -- You can continue pushing your local repositories to the old remote tracking URL without updating it. However, we recommend you update all existing remote repository URLs after changing your organization name. Because your old organization name is available for use by anyone else after you change it, the new organization owner can create repositories that override the redirect entries to your repository. For more information, see "[Changing a remote's URL](/articles/changing-a-remote-s-url)." +- You can continue pushing your local repositories to the old remote tracking URL without updating it. However, we recommend you update all existing remote repository URLs after changing your organization name. Because your old organization name is available for use by anyone else after you change it, the new organization owner can create repositories that override the redirect entries to your repository. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." - Previous Git commits will also be correctly attributed to users within your organization. #### Changes that aren't automatic @@ -46,5 +46,4 @@ After changing your organization's name: ### Further reading -* "[Changing a remote's URL](/articles/changing-a-remote-s-url)" * "[Why are my commits linked to the wrong user?](/articles/why-are-my-commits-linked-to-the-wrong-user)" diff --git a/content/github/setting-up-and-managing-your-github-user-account/changing-your-github-username.md b/content/github/setting-up-and-managing-your-github-user-account/changing-your-github-username.md index 08ec06aef5..6068a5973f 100644 --- a/content/github/setting-up-and-managing-your-github-user-account/changing-your-github-username.md +++ b/content/github/setting-up-and-managing-your-github-user-account/changing-your-github-username.md @@ -32,7 +32,7 @@ After you change your username, {% data variables.product.product_name %} will a - Web links to your existing repositories will continue to work. This can take a few minutes to complete after you make the change. - Command line pushes from your local repository clones to the old remote tracking URLs will continue to work. -If the new owner of your old username creates a repository with the same name as your repository, that will override the redirect entry and your redirect will stop working. Because of this possibility, we recommend you update all existing remote repository URLs after changing your username. For more information, see "[Changing a remote's URL](/articles/changing-a-remote-s-url)." +If the new owner of your old username creates a repository with the same name as your repository, that will override the redirect entry and your redirect will stop working. Because of this possibility, we recommend you update all existing remote repository URLs after changing your username. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)." ### Links to your previous profile page @@ -58,6 +58,5 @@ After changing your username, links to your previous profile page, such as `http ### Further reading -- "[Changing a remote's URL](/articles/changing-a-remote-s-url)" - "[Why are my commits linked to the wrong user?](/articles/why-are-my-commits-linked-to-the-wrong-user)"{% if currentVersion == "free-pro-team@latest" %} - "[{% data variables.product.prodname_dotcom %} Username Policy](/articles/github-username-policy)"{% endif %} diff --git a/content/github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts.md b/content/github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts.md index 6882f942b3..56598bb796 100644 --- a/content/github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts.md +++ b/content/github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts.md @@ -18,7 +18,7 @@ topics: {% endtip %} 1. [Transfer any repositories](/articles/how-to-transfer-a-repository) from the account you want to delete to the account you want to keep. Issues, pull requests, and wikis are transferred as well. Verify the repositories exist on the account you want to keep. -2. [Update the remote URLs](/articles/changing-a-remote-s-url) in any local clones of the repositories that were moved. +2. [Update the remote URLs](/github/getting-started-with-github/managing-remote-repositories) in any local clones of the repositories that were moved. 3. [Delete the account](/articles/deleting-your-user-account) you no longer want to use. ### Further reading diff --git a/content/github/setting-up-and-managing-your-github-user-account/remembering-your-github-username-or-email.md b/content/github/setting-up-and-managing-your-github-user-account/remembering-your-github-username-or-email.md index a438da5c1b..102f4f68f9 100644 --- a/content/github/setting-up-and-managing-your-github-user-account/remembering-your-github-username-or-email.md +++ b/content/github/setting-up-and-managing-your-github-user-account/remembering-your-github-username-or-email.md @@ -36,7 +36,7 @@ topics: ### Finding your username in your `user.name` configuration -During set up, you may have [set your username in Git](/articles/setting-your-username-in-git). If so, you can review the value of this configuration setting: +During set up, you may have [set your username in Git](/github/getting-started-with-github/setting-your-username-in-git). If so, you can review the value of this configuration setting: ```shell $ git config user.name diff --git a/content/github/using-git/about-remote-repositories.md b/content/github/using-git/about-remote-repositories.md deleted file mode 100644 index 9706800ba8..0000000000 --- a/content/github/using-git/about-remote-repositories.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: About remote repositories -redirect_from: - - /articles/working-when-github-goes-down/ - - /articles/sharing-repositories-without-github/ - - /articles/about-remote-repositories -intro: 'GitHub''s collaborative approach to development depends on publishing commits from your local repository for other people to view, fetch, and update.' -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - -A remote URL is Git's fancy way of saying "the place where your code is stored." -That URL could be your repository on GitHub, or another user's fork, or even on -a completely different server. - -You can only push to two types of URL addresses: - -* An HTTPS URL like `https://{% data variables.command_line.backticks %}/user/repo.git` -* An SSH URL, like `git@{% data variables.command_line.backticks %}:user/repo.git` - -Git associates a remote URL with a name, and your default remote is usually called `origin`. - -For information on the differences between these URLs, see "[Which remote URL should I use?](/articles/which-remote-url-should-i-use)" - -### Creating remotes - -You can use the `git remote add` command to match a remote URL with a name. -For example, you'd type the following in the command line: - -```shell -git remote add origin <REMOTE_URL> -``` - -This associates the name `origin` with the `REMOTE_URL`. - -You can use the command `git remote set-url` to [change a remote's URL](/articles/changing-a-remote-s-url). diff --git a/content/github/using-git/adding-a-remote.md b/content/github/using-git/adding-a-remote.md deleted file mode 100644 index 65d792400a..0000000000 --- a/content/github/using-git/adding-a-remote.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Adding a remote -intro: 'To add a new remote, use the `git remote add` command on the terminal, in the directory your repository is stored at.' -redirect_from: - - /articles/adding-a-remote -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - -The `git remote add` command takes two arguments: - -* A remote name, for example, `origin` -* A remote URL, for example, `https://{% data variables.command_line.backticks %}/user/repo.git` - -For example: - -```shell -$ git remote add origin https://{% data variables.command_line.codeblock %}/user/repo.git -# Set a new remote - -$ git remote -v -# Verify new remote -> origin https://{% data variables.command_line.codeblock %}/user/repo.git (fetch) -> origin https://{% data variables.command_line.codeblock %}/user/repo.git (push) -``` - -Not sure which URL to use? Check out "[Which remote URL should I use?](/articles/which-remote-url-should-i-use)" - -### Troubleshooting - -You may encounter these errors when trying to add a remote. - -#### Remote `name` already exists - -This error means you've tried to add a remote with a name that already exists in your local repository: - -```shell -$ git remote add origin https://{% data variables.command_line.codeblock %}/octocat/Spoon-Knife.git -> fatal: remote origin already exists. -``` - -To fix this, you can - -* Use a different name for the new remote -* [Rename the existing remote](/articles/renaming-a-remote) -* [Delete the existing remote](/articles/removing-a-remote) - -### Further reading - -- "[Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) diff --git a/content/github/using-git/changing-a-remotes-url.md b/content/github/using-git/changing-a-remotes-url.md deleted file mode 100644 index 885cc6b798..0000000000 --- a/content/github/using-git/changing-a-remotes-url.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Changing a remote's URL -redirect_from: - - /articles/changing-a-remote-s-url - - /articles/changing-a-remotes-url -intro: The `git remote set-url` command changes an existing remote repository URL. -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - -{% tip %} - -**Tip:** For information on the difference between HTTPS and SSH URLs, see "[Which remote URL should I use?](/articles/which-remote-url-should-i-use)" - -{% endtip %} - -The `git remote set-url` command takes two arguments: - -* An existing remote name. For example, `origin` or `upstream` are two common choices. -* A new URL for the remote. For example: - * If you're updating to use HTTPS, your URL might look like: -```shell -https://{% data variables.command_line.backticks %}/USERNAME/REPOSITORY.git -``` - * If you're updating to use SSH, your URL might look like: -```shell -git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git -``` - -### Switching remote URLs from SSH to HTTPS - -{% data reusables.command_line.open_the_multi_os_terminal %} -2. Change the current working directory to your local project. -3. List your existing remotes in order to get the name of the remote you want to change. - ```shell - $ git remote -v - > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (fetch) - > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (push) - ``` -4. Change your remote's URL from SSH to HTTPS with the `git remote set-url` command. - ```shell - $ git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git - ``` -5. Verify that the remote URL has changed. - ```shell - $ git remote -v - # Verify new remote URL - > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch) - > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push) - ``` - -The next time you `git fetch`, `git pull`, or `git push` to the remote repository, you'll be asked for your GitHub username and password. {% data reusables.user_settings.password-authentication-deprecation %} - -You can [use a credential helper](/github/using-git/caching-your-github-credentials-in-git) so Git will remember your GitHub username and personal access token every time it talks to GitHub. - -### Switching remote URLs from HTTPS to SSH - -{% data reusables.command_line.open_the_multi_os_terminal %} -2. Change the current working directory to your local project. -3. List your existing remotes in order to get the name of the remote you want to change. - ```shell - $ git remote -v - > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch) - > origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push) - ``` -4. Change your remote's URL from HTTPS to SSH with the `git remote set-url` command. - ```shell - $ git remote set-url origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git - ``` -5. Verify that the remote URL has changed. - ```shell - $ git remote -v - # Verify new remote URL - > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (fetch) - > origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (push) - ``` - -### Troubleshooting - -You may encounter these errors when trying to change a remote. - -#### No such remote '[name]' - -This error means that the remote you tried to change doesn't exist: - -```shell -$ git remote set-url sofake https://{% data variables.command_line.codeblock %}/octocat/Spoon-Knife -> fatal: No such remote 'sofake' -``` - -Check that you've correctly typed the remote name. - -### Further reading - -- ["Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) diff --git a/content/github/using-git/index.md b/content/github/using-git/index.md deleted file mode 100644 index 4c9e0f86c9..0000000000 --- a/content/github/using-git/index.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Using Git -intro: 'Learn common and advanced workflows in Git to enhance your experience using {% data variables.product.prodname_dotcom %}.' -redirect_from: - - /categories/19/articles/ - - /categories/using-git -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - - -### Table of Contents - -{% topic_link_in_list /getting-started-with-git-and-github %} - {% link_in_list /setting-your-username-in-git %} - {% link_in_list /caching-your-github-credentials-in-git %} - {% link_in_list /why-is-git-always-asking-for-my-password %} - {% link_in_list /updating-credentials-from-the-macos-keychain %} -{% topic_link_in_list /learning-about-git %} - {% link_in_list /git-workflows %} - {% link_in_list /associating-text-editors-with-git %} - {% link_in_list /configuring-git-to-handle-line-endings %} - {% link_in_list /ignoring-files %} -{% topic_link_in_list /using-common-git-commands %} - {% link_in_list /pushing-commits-to-a-remote-repository %} - {% link_in_list /getting-changes-from-a-remote-repository %} - {% link_in_list /dealing-with-non-fast-forward-errors %} -{% topic_link_in_list /managing-remote-repositories %} - {% link_in_list /about-remote-repositories %} - {% link_in_list /which-remote-url-should-i-use %} - {% link_in_list /adding-a-remote %} - {% link_in_list /changing-a-remotes-url %} - {% link_in_list /renaming-a-remote %} - {% link_in_list /removing-a-remote %} -{% topic_link_in_list /using-advanced-git-commands %} - {% link_in_list /about-git-rebase %} - {% link_in_list /using-git-rebase-on-the-command-line %} - {% link_in_list /resolving-merge-conflicts-after-a-git-rebase %} - {% link_in_list /about-git-subtree-merges %} - {% link_in_list /splitting-a-subfolder-out-into-a-new-repository %} diff --git a/content/github/using-git/learning-about-git.md b/content/github/using-git/learning-about-git.md deleted file mode 100644 index 8fc7d4818e..0000000000 --- a/content/github/using-git/learning-about-git.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Learning about Git -intro: '' -mapTopic: true -redirect_from: - - /articles/learning-about-git -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - diff --git a/content/github/using-git/managing-remote-repositories.md b/content/github/using-git/managing-remote-repositories.md deleted file mode 100644 index 88eb072548..0000000000 --- a/content/github/using-git/managing-remote-repositories.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Managing remote repositories -intro: 'Learn to work with your local repositories on your computer and remote repositories hosted on {% data variables.product.product_name %}.' -mapTopic: true -redirect_from: - - /categories/18/articles/ - - /remotes/ - - /categories/managing-remotes/ - - /articles/managing-remote-repositories -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - diff --git a/content/github/using-git/removing-a-remote.md b/content/github/using-git/removing-a-remote.md deleted file mode 100644 index 1c7337e7b2..0000000000 --- a/content/github/using-git/removing-a-remote.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Removing a remote -intro: Use the `git remote rm` command to remove a remote URL from your repository. -redirect_from: - - /articles/removing-a-remote -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - -The `git remote rm` command takes one argument: - -* A remote name, for example, `destination` - -### Example - -These examples assume you're [cloning using HTTPS](/articles/which-remote-url-should-i-use/#cloning-with-https-urls), which is recommended. - -```shell -$ git remote -v -# View current remotes -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) -> destination https://{% data variables.command_line.codeblock %}/FORKER/REPOSITORY.git (fetch) -> destination https://{% data variables.command_line.codeblock %}/FORKER/REPOSITORY.git (push) - -$ git remote rm destination -# Remove remote -$ git remote -v -# Verify it's gone -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) -``` - -{% warning %} - -**Note**: `git remote rm` does not delete the remote repository from the server. It simply -removes the remote and its references from your local repository. - -{% endwarning %} - -### Troubleshooting - -You may encounter these errors when trying to remove a remote. - -#### Could not remove config section 'remote.[name]' - -This error means that the remote you tried to delete doesn't exist: - -```shell -$ git remote rm sofake -> error: Could not remove config section 'remote.sofake' -``` - -Check that you've correctly typed the remote name. - -### Further reading - -- ["Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) diff --git a/content/github/using-git/renaming-a-remote.md b/content/github/using-git/renaming-a-remote.md deleted file mode 100644 index 12b50588bf..0000000000 --- a/content/github/using-git/renaming-a-remote.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Renaming a remote -intro: Use the `git remote rename` command to rename an existing remote. -redirect_from: - - /articles/renaming-a-remote -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - -The `git remote rename` command takes two arguments: - -* An existing remote name, for example, `origin` -* A new name for the remote, for example, `destination` - -### Example - -These examples assume you're [cloning using HTTPS](/articles/which-remote-url-should-i-use/#cloning-with-https-urls), which is recommended. - -```shell -$ git remote -v -# View existing remotes -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) - -$ git remote rename origin destination -# Change remote name from 'origin' to 'destination' - -$ git remote -v -# Verify remote's new name -> destination https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) -> destination https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) -``` - -### Troubleshooting - -You may encounter these errors when trying to rename a remote. - -#### Could not rename config section 'remote.[old name]' to 'remote.[new name]' - -This error means that the remote you tried the old remote name you typed doesn't exist. - -You can check which remotes currently exist with the `git remote -v` command: - -```shell -$ git remote -v -# View existing remotes -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch) -> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push) -``` - -#### Remote [new name] already exists. - -This error means that the remote name you want to use already exists. To solve this, -either use a different remote name, or rename the original remote. - -### Further reading - -- ["Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes) diff --git a/content/github/using-git/using-common-git-commands.md b/content/github/using-git/using-common-git-commands.md deleted file mode 100644 index 8370d6f9d7..0000000000 --- a/content/github/using-git/using-common-git-commands.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Using common Git commands -intro: '' -mapTopic: true -redirect_from: - - /articles/using-common-git-commands -versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' ---- - diff --git a/content/index.md b/content/index.md index c915b6dd27..8a144eecbf 100644 --- a/content/index.md +++ b/content/index.md @@ -10,7 +10,7 @@ featuredLinks: - /github/collaborating-with-issues-and-pull-requests/about-pull-requests - /github/authenticating-to-github - /github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line - - /github/using-git/managing-remote-repositories + - /github/getting-started-with-github/managing-remote-repositories - /github/working-with-github-pages versions: '*' --- diff --git a/content/rest/reference/gitignore.md b/content/rest/reference/gitignore.md index 08f18a2449..f1a193f354 100644 --- a/content/rest/reference/gitignore.md +++ b/content/rest/reference/gitignore.md @@ -10,7 +10,7 @@ topics: - api --- -When you create a new {% data variables.product.product_name %} repository via the API, you can specify a [.gitignore template](/github/using-git/ignoring-files) to apply to the repository upon creation. The .gitignore templates API lists and fetches templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore). +When you create a new {% data variables.product.product_name %} repository via the API, you can specify a [.gitignore template](/github/getting-started-with-github/ignoring-files) to apply to the repository upon creation. The .gitignore templates API lists and fetches templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore). ### Custom media types for gitignore diff --git a/contributing/content-style-guide.md b/contributing/content-style-guide.md index d23c078924..d9a67e21fe 100644 --- a/contributing/content-style-guide.md +++ b/contributing/content-style-guide.md @@ -13,6 +13,7 @@ These guidelines are specific to GitHub’s documentation. For general style que - [Commands](#commands) - [Examples](#examples) - [Indentation](#indentation) + - [Scheduled workflows](#scheduled-workflows) - [Headers](#headers) - [Images](#images) - [Alt text](#alt-text) @@ -145,6 +146,14 @@ In YAML examples, such as actions and workflow files, use two spaces to indent l python-version: ${{ matrix.python }} ``` +### Scheduled workflows + +Workflow runs are delayed when too many workflows run at once. Since many users copy code from the GitHub docs, we should use examples that guide users away from congested times. + +- Do not use examples that run on the hour. (The Actions team reports that times at the start of the hour, especially UTC midnight, are disproportionately overloaded.) +- Do not use examples that run more frequently than necessary. For example, instead of running every 5 minutes, consider if the example makes sense to run every 30 minutes instead. +- Use a different time for each example. + ## Headers Use H3 for headers, and H4 for subheaders. When referring to headers, surround the header name with quotation marks. diff --git a/data/graphql/schema.docs.graphql b/data/graphql/schema.docs.graphql index 6ef5ff6e9d..c5d1c25d0a 100644 --- a/data/graphql/schema.docs.graphql +++ b/data/graphql/schema.docs.graphql @@ -34258,6 +34258,11 @@ type SponsorsTier implements Node { descriptionHTML: HTML! id: ID! + """ + Whether this tier is only for use with one-time sponsorships. + """ + isOneTime: Boolean! + """ How much this tier costs per month in cents. """ diff --git a/data/reusables/git/git-push.md b/data/reusables/git/git-push.md index 09ae8c1dce..2e99b1f21b 100644 --- a/data/reusables/git/git-push.md +++ b/data/reusables/git/git-push.md @@ -1,4 +1,4 @@ -1. [Push the changes](/articles/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. +1. [Push the changes](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) in your local repository to {% data variables.product.product_location %}. ```shell $ git push origin your-branch # Pushes the changes in your local repository up to the remote repository you specified as the origin diff --git a/includes/contribution.html b/includes/contribution.html index 3f3ace786f..1968105c7c 100644 --- a/includes/contribution.html +++ b/includes/contribution.html @@ -2,7 +2,12 @@
{% data ui.contribution_cta.body %}
- + {% if page.relativePath %} + {% assign contribution_href = "https://github.com/github/docs/edit/main/content/" | append: page.relativePath %} + {% else %} + {% assign contribution_href = "https://github.com/github/docs" %} + {% endif %} + {% octicon "git-pull-request" height="16" %} {% data ui.contribution_cta.button %} diff --git a/layouts/enterprise-server-releases.html b/layouts/enterprise-server-releases.html index 24ee07a5bb..c15f61b019 100644 --- a/layouts/enterprise-server-releases.html +++ b/layouts/enterprise-server-releases.html @@ -6,6 +6,9 @@ {% include sidebar %}