Skip to content

Amend git pull --set-upstream origin main to git push#10366

Closed
ghost wants to merge 1 commit into
mainfrom
unknown repository
Closed

Amend git pull --set-upstream origin main to git push#10366
ghost wants to merge 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Sep 28, 2021

Copy link
Copy Markdown

Amend "git pull --set-upstream origin main" to "git push --set-upstream origin main" because this is about pushing an existing project first time to github.

Why:

Closes [issue link]

What's being changed:

Check off the following:

  • I have reviewed my changes in staging (look for the latest deployment event in your pull request's timeline, then click View deployment).
  • For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

  • This pull request impacts the contribution experience
    • I have added the 'writer impact' label
    • I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

Amend "git pull --set-upstream origin main" to "git push --set-upstream origin main" because this is about pushing an existing project first time to github.
@welcome

welcome Bot commented Sep 28, 2021

Copy link
Copy Markdown

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Sep 28, 2021
@rcowsill

Copy link
Copy Markdown
Contributor

The instructions are correct in using git pull for this case. Step 3 uses the GitHub CLI to create the repository on GitHub, and then git pull is used to pull origin/main into main and set up the remote tracking branch.

There's another section on that page that explains how to create a repository locally and push it up to GitHub. It uses git push as expected:
https://docs.github.com/en/github/importing-your-projects-to-github/importing-source-code-to-github/adding-an-existing-project-to-github-using-the-command-line#adding-a-project-to-github-without-github-cli

@ramyaparimi ramyaparimi added content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Sep 29, 2021
@ramyaparimi

ramyaparimi commented Sep 29, 2021

Copy link
Copy Markdown
Contributor

@asklittlkat
Thanks so much for opening a PR! I'll get this triaged for review ⚡

@ramyaparimi ramyaparimi reopened this Sep 29, 2021
@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Sep 29, 2021
@ramyaparimi ramyaparimi removed the triage Do not begin working on this issue until triaged by the team label Sep 29, 2021
@skedwards88

Copy link
Copy Markdown
Contributor

The instructions are correct in using git pull for this case. Step 3 uses the GitHub CLI to create the repository on GitHub, and then git pull is used to pull origin/main into main and set up the remote tracking branch.

There's another section on that page that explains how to create a repository locally and push it up to GitHub. It uses git push as expected: https://docs.github.com/en/github/importing-your-projects-to-github/importing-source-code-to-github/adding-an-existing-project-to-github-using-the-command-line#adding-a-project-to-github-without-github-cli

Excellent explanation, @rcowsill ! You need to git pull to get the changes from the GitHub repository that you created (if you added any files like a gitignore during repo creation). The following step instructs you to do a git push.

@asklittlkat I'm going to close this PR, but I'd love to see more contributions from you in the future ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants