From d988a3ab1000fc70d6f4d90b28d26869d9ea1777 Mon Sep 17 00:00:00 2001 From: retiform Date: Wed, 17 Oct 2018 13:42:42 -0400 Subject: [PATCH 1/7] add instructions for what to do if you add the wrong remote --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index b83da7f..4495054 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ For clarity's sake all examples in this document use a customized bash prompt in - [Repositories](#repositories) - [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 set the wrong remote repository.](#i-set-the-wrong-remote-repository) - [Editing Commits](#editing-commits) - [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) @@ -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 ``` +### 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 From 066cf428e1724a00b827e8f1fa33d6657609e416 Mon Sep 17 00:00:00 2001 From: Cole Date: Tue, 27 Nov 2018 22:56:06 -0500 Subject: [PATCH 2/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4495054..1ce6f70 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ For clarity's sake all examples in this document use a customized bash prompt in - [Repositories](#repositories) - [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 set the wrong remote repository.](#i-set-the-wrong-remote-repository) + - [I set the wrong remote repository](#i-set-the-wrong-remote-repository) - [Editing Commits](#editing-commits) - [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) @@ -146,7 +146,7 @@ To clone it into a folder with a different name than the default repository name $ git clone [url] name-of-new-folder ``` -### I set the wrong remote repository. +### I set the wrong remote repository There are a few possible problems here: From 9b54d14dff1bc2a09846ef1930d854264fee8fc7 Mon Sep 17 00:00:00 2001 From: Cole Date: Tue, 27 Nov 2018 22:57:52 -0500 Subject: [PATCH 3/7] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1ce6f70..44fcf4c 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,6 @@ $ git clone [url] name-of-new-folder 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 From 8809567e7a5e8da17f0983ba5821bbe06ab14dcc Mon Sep 17 00:00:00 2001 From: Cole Date: Tue, 27 Nov 2018 22:59:54 -0500 Subject: [PATCH 4/7] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 44fcf4c..1d52bb4 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,7 @@ $ git clone [url] name-of-new-folder 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 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 From ca49abe067c6c5c7513a1c578a573c5906e70aac Mon Sep 17 00:00:00 2001 From: Cole Date: Tue, 27 Nov 2018 23:00:21 -0500 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d52bb4..3f37761 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ $ git clone [url] name-of-new-folder 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 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 From bd388a89c5fc207415318f0c661235e541ff8684 Mon Sep 17 00:00:00 2001 From: Cole Date: Tue, 27 Nov 2018 23:01:22 -0500 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f37761..5485ad5 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ 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 +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] From d6e98fd5379ddfa8168d33969cb8b649d0939e54 Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Wed, 28 Nov 2018 08:47:50 -0500 Subject: [PATCH 7/7] Small spelling and style changes --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5485ad5..3118cfe 100644 --- a/README.md +++ b/README.md @@ -150,14 +150,15 @@ $ git clone [url] name-of-new-folder 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 cloned the wrong repository, 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: +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) + +For more, see [this StackOverflow topic](https://stackoverflow.com/questions/2432764/how-to-change-the-uri-url-for-a-remote-git-repository#2432799). ## Editing Commits