I recently completed an online course that allowed me access to the instructor's GitHub repositories which were used as the scaffolding for each of the projects. I'm attempting to create my own project using the same boilerplates, however I'd like to store the changes in my own repository. How do I transfer a cloned repository into my github account so that when I make changes, they are recognized in my account only? Thank you.
Asked
Active
Viewed 29 times
1 Answers
2
If you simply want your own repo from his template, just create a repo in GitHub web interface and then push to it by adding the repo as remote with git remote add
or git remote set-url
and then pushing.
If you want your repo to be a fork of his repo, go to his repo, press the Fork
button and then again as described before.

Vampire
- 35,631
- 4
- 76
- 102
-
I made a new repository and used the following syntax git remote add origin [url of my new project] however I received this error in terminal "fatal: remote origin already exists.". What am I doing wrong? – pghInitechBranch Jan 17 '17 at 01:17
-
1Well, the error is pretty self-explanatory, isn't it? You try to add a remote named `origin` while there is already one. Most probably the one you cloned from. Either use `git remote set-url` to point `origin` to your new repo as I originally said, or add it as remote that has a different name than `origin`. – Vampire Jan 17 '17 at 01:26
-
I'm still a bit confused as to why the use of origin would conflict when I'm creating a separate repository. Conceptually, I thought this process was similar to me making a new folder on my desktop and copying a file within another folder to the new folder I created. I'll need to read up on the github docs to get a better understanding of this process and to make it work. Thanks for your help. – pghInitechBranch Jan 17 '17 at 02:07
-
1This has nothing to do with GitHub. How you call your remotes in your local repository is totally up to you. `origin` is just a conventional default name, but you can also name your remotes `foo` or `bar` or `pandora`. Now if you clone a repository and do not instruct Git otherwise, it will store the cloned repo (your teachers one) as remote `origin`. If you now try to add your new GitHub repo as remote with name `origin` this of course conflicts. Thus either reuse the existing `origin` with `set-url` or create a new differently named remote. Just like I said in the original answer already ;-) – Vampire Jan 17 '17 at 02:18