开发者

Whats the best way to clone / duplicate a project into a new with git?

开发者 https://www.devze.com 2023-04-02 18:10 出处:网络
I want to clone an existing git repo for a NEW project. After the cloning the code should be developed independe开发者_运维问答nt from the original. I want to host the NEW project on GITHUB too.

I want to clone an existing git repo for a NEW project. After the cloning the code should be developed independe开发者_运维问答nt from the original. I want to host the NEW project on GITHUB too.

My Workflow:

  • git clone BASE_GITHUB_URL NEW_DIR
  • cd /NEW_DIR

But after that my 'clone' is connected with the base repo on Github. I want to push the changes into a NEW Github Repo instad

I new its simular like 'fork', but it doesn't work with me as same the user on Github.


Remove the reference to the original repository:

git remote rm origin

Add a reference to your own repository:

git remote add origin your-repos-url

You may want to only rename the original repository instead of removing it:

git remote rename origin upstream

See git help remote for more informations.

0

精彩评论

暂无评论...
验证码 换一张
取 消