mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
add instructions for what to do if you add the wrong remote
This commit is contained in:
parent
83261c5b7a
commit
d988a3ab10
16
README.md
16
README.md
@ -25,6 +25,7 @@ For clarity's sake all examples in this document use a customized bash prompt in
|
|||||||
- [Repositories](#repositories)
|
- [Repositories](#repositories)
|
||||||
- [I want to start a local repository](#i-want-to-start-a-local-repository)
|
- [I want to start a local repository](#i-want-to-start-a-local-repository)
|
||||||
- [I want to clone a remote repository](#i-want-to-clone-a-remote-repository)
|
- [I want to clone a remote repository](#i-want-to-clone-a-remote-repository)
|
||||||
|
- [I set the wrong remote repository.](#i-set-the-wrong-remote-repository)
|
||||||
- [Editing Commits](#editing-commits)
|
- [Editing Commits](#editing-commits)
|
||||||
- [What did I just commit?](#what-did-i-just-commit)
|
- [What did I just commit?](#what-did-i-just-commit)
|
||||||
- [I wrote the wrong thing in a commit message](#i-wrote-the-wrong-thing-in-a-commit-message)
|
- [I wrote the wrong thing in a commit message](#i-wrote-the-wrong-thing-in-a-commit-message)
|
||||||
@ -145,6 +146,21 @@ To clone it into a folder with a different name than the default repository name
|
|||||||
$ git clone [url] name-of-new-folder
|
$ git clone [url] name-of-new-folder
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### I set the wrong remote repository.
|
||||||
|
|
||||||
|
There are a few possible problems here:
|
||||||
|
|
||||||
|
|
||||||
|
If you cloned the wrong respistory simply delete the directory created after running git clone and clone the correct repository
|
||||||
|
|
||||||
|
|
||||||
|
If you set the wrong repository as the origin of an existing local repository, change the url of your origin by running
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ git remote set-url origin [url of the actual repo]
|
||||||
|
```
|
||||||
|
For more see [this SO top](https://stackoverflow.com/questions/2432764/how-to-change-the-uri-url-for-a-remote-git-repository#2432799)
|
||||||
|
|
||||||
## Editing Commits
|
## Editing Commits
|
||||||
|
|
||||||
<a name="diff-last"></a>
|
<a name="diff-last"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user