0

I have a project cloned from github, and I want to disconnect its relationship with the current repository and push in into a new one (not a new branch but a whole new repo). Is it possible?

Ariel Netz
  • 111
  • 1
  • 10

3 Answers3

0
git remote set-url origin <new-repo-url>
git push --all
git push --tags
Kampai
  • 22,848
  • 21
  • 95
  • 95
alpheus
  • 240
  • 1
  • 12
0

What you are talking about is fork. It actually creates new repository and mark it under your name. All the history of the original repository remains as it is.

Read more about forking here, here and here.

Community
  • 1
  • 1
Akshay
  • 3,558
  • 4
  • 43
  • 77
0

You just need to change remote url.

git config --edit

Default editor will be opened with the current repos config. You can see remote URL in it like below

url=git@github.com:{user_name}/{old_repo}.git

replace this with git@github.com:{user_name}/{new_repo}.git (if you are using vi editor enter i for insert and :wq for write and quit the editor)

Finally,

git push origin

Hope it works !

Suryavel TR
  • 3,576
  • 1
  • 22
  • 25