Github - How to create a second Fork from a particular repository?

Asked

Viewed 428 times

1

Let’s say I have a repository layout user\original as meuser\original.

If I want to create a new Fork from the first one, how do I do it? On github when you click to create a new Fork it just redirects to the existing Fork.

What it would look like if I renamed Fork meuser\original as meuser\original-OLD and want to create a new Fork meuser\original with the latest updates?

2 answers

1

I ended up finding an article about how to do this.

The procedure is called "Dupliforking" and the article link is this: https://github.com/enyojs/enyo/wiki/Dupliforking

Below a translation:

Suppose you want to create the "Milliondollars".

Clone the original repository (here the bootplate) and cd to the folder.

git clone https://github.com/enyojs/bootplate.git MillionDollars

cd MillionDollars

Initialize the subrepositories.

git submodule update --init

Go to the Github website and create a new repository with your chosen name ("Milliondollars").

Point the bootplate clone to your new repository (This step changes where commits are downloaded and uploaded)

git remote set-url origin [email protected]:<your user name>/MillionDollars.git

Users of text editors can also directly edit the file MillionDollars/.git/config:

[remote "origin"]
    url = [email protected]:<your user name>/MillionDollars.git
    ...

Push your repository

All set!

0

Em made you create a Fork, why don’t you create a branch in the same repository instead of a Fork, preserves all previous commits, then you can merge what you want with the master.

Edit: Removed the link, after realizing the real idea of the question :)

  • It is that I would like to preserve the commits of the original Code, and to merge the modifications from the original to Source is now unlikely by the amount of scrambled code. And at this link the question talks about making a Fork from a Fork, which is not my case. I wanted to make a second Fork of the original repository, unrelated to the existing Fork

  • Okay, I thought it was a Fork log you already had, I still think that the branch does everything you want, preserves what you already have then you can merge between branch and master

  • And what would the command lines look like to do that? I’m a layman at that part.

  • It’s relatively easy, you can merge with the website, software or git bash http://stackoverflow.com/questions/5601931/best-and-safest-way-to-merge-a-git-branch-into-master

Browser other questions tagged

You are not signed in. Login or sign up in order to post.