Skip to content

Commit fc0962c

Browse files
authored
Merge pull request github#35428 from github/repo-sync
repo sync
2 parents 8b8faa1 + 0727a6b commit fc0962c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

content/get-started/getting-started-with-git/managing-remote-repositories.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ To add a new remote, use the `git remote add` command on the terminal, in the di
3131

3232
The `git remote add` command takes two arguments:
3333
* A remote name, for example, `origin`
34-
* A remote URL, for example, `https://{% data variables.command_line.backticks %}/user/repo.git`
34+
* A remote URL, for example, `https://{% data variables.command_line.backticks %}/OWNER/REPOSITORY.git`
3535

3636
For example:
3737

3838
```shell
39-
$ git remote add origin https://{% data variables.command_line.codeblock %}/USER/REPO.git
39+
$ git remote add origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git
4040
# Set a new remote
4141

4242
$ git remote -v
4343
# Verify new remote
44-
> origin https://{% data variables.command_line.codeblock %}/USER/REPO.git (fetch)
45-
> origin https://{% data variables.command_line.codeblock %}/USER/REPO.git (push)
44+
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
45+
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
4646
```
4747

4848
For more information on which URL to use, see "[AUTOTITLE](/get-started/getting-started-with-git/about-remote-repositories)."
@@ -77,11 +77,11 @@ The `git remote set-url` command takes two arguments:
7777
* A new URL for the remote. For example:
7878
* If you're updating to use HTTPS, your URL might look like:
7979
```shell
80-
https://{% data variables.command_line.backticks %}/USERNAME/REPOSITORY.git
80+
https://{% data variables.command_line.backticks %}/OWNER/REPOSITORY.git
8181
```
8282
* If you're updating to use SSH, your URL might look like:
8383
```shell
84-
git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git
84+
git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git
8585
```
8686

8787
### Switching remote URLs from SSH to HTTPS
@@ -91,19 +91,19 @@ git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git
9191
3. List your existing remotes in order to get the name of the remote you want to change.
9292
```shell
9393
$ git remote -v
94-
> origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (fetch)
95-
> origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git (push)
94+
> origin git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git (fetch)
95+
> origin git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git (push)
9696
```
9797
4. Change your remote's URL from SSH to HTTPS with the `git remote set-url` command.
9898
```shell
99-
$ git remote set-url origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git
99+
$ git remote set-url origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git
100100
```
101101
5. Verify that the remote URL has changed.
102102
```shell
103103
$ git remote -v
104104
# Verify new remote URL
105-
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch)
106-
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push)
105+
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
106+
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
107107
```
108108

109109
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 %}
@@ -117,19 +117,19 @@ You can [use a credential helper](/get-started/getting-started-with-git/caching-
117117
3. List your existing remotes in order to get the name of the remote you want to change.
118118
```shell
119119
$ git remote -v
120-
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (fetch)
121-
> origin https://{% data variables.command_line.codeblock %}/USERNAME/REPOSITORY.git (push)
120+
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (fetch)
121+
> origin https://{% data variables.command_line.codeblock %}/OWNER/REPOSITORY.git (push)
122122
```
123123
4. Change your remote's URL from HTTPS to SSH with the `git remote set-url` command.
124124
```shell
125-
$ git remote set-url origin git@{% data variables.command_line.codeblock %}:USERNAME/REPOSITORY.git
125+
$ git remote set-url origin git@{% data variables.command_line.codeblock %}:OWNER/REPOSITORY.git
126126
```
127127
5. Verify that the remote URL has changed.
128128
```shell
129129
$ git remote -v
130130
# Verify new remote URL
131-
> origin git@{% data variables.command_line.codeblock %}: USERNAME/REPOSITORY.git (fetch)
132-
> origin git@{% data variables.command_line.codeblock %}: USERNAME/REPOSITORY.git (push)
131+
> origin git@{% data variables.command_line.codeblock %}: OWNER/REPOSITORY.git (fetch)
132+
> origin git@{% data variables.command_line.codeblock %}: OWNER/REPOSITORY.git (push)
133133
```
134134

135135
### Troubleshooting: No such remote '[name]'

0 commit comments

Comments
 (0)