Mladen
Mladen

Reputation: 139

How to upload a cloned git repository to an own git repository on github?

I have cloned a project from github. Now I want to upload it to my own private repository on github to work on it. But the cloned repository has in the origin key the value of the cloned project. What's the best practice to upload this project to my own private repository? I've read the german version of the git documentation (https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) but haven't found the solution.

Upvotes: 8

Views: 3717

Answers (2)

phd
phd

Reputation: 94407

With the command

git remote add newrepo NewRepoURL

you will have an additional remote called newrepo (you can name it any way you want) pointed to NewRepoURL. To push (not upload) you branch to the new remote do

git push newrepo master

Upvotes: 3

Boshika Tara
Boshika Tara

Reputation: 274

Here the steps you can follow

git remote -v
git remote remove origin
git remote -v   //to check if it was remove

Go to Github, create a new repository.

git remote add origin <the new repository>
git remote -v

Upvotes: 7

Related Questions