Pahlevi Fikri Auliya
Pahlevi Fikri Auliya

Reputation: 4517

Can't fork a repo in GitHub after forking fork of that repo

https://github.com/timdp/heroku-buildpack-nodejs-gulp is fork of https://github.com/heroku/heroku-buildpack-nodejs

If I forked the first one first (from GitHub web interface), I couldn't fork the second one into my GitHub.

If I forked the second one first, I couldn't fork the first one.

Is it bug or feature of GitHub? I wish to fork both into my GitHub. If possible, how to do that?

Upvotes: 3

Views: 1617

Answers (2)

lcapra
lcapra

Reputation: 1540

I use to make a fork on my account from the original source, then add other forks as remote and merge eg

git clone <your fork url> name
cd name
git remote -v
git remote add upstream <original repo url>
git remote add somefork <another fork of repo url>
# move to your fork
git checkout origin/master
# merge original repo
git fetch upstream/master
git merge upstream/master
# merge other user fork 
git fetch somefork/master
git merge somefork/master

Here you should have an up-to-date repository with all recent changes of both repos (if those are compatible and mergeable)

Upvotes: 1

VonC
VonC

Reputation: 1323363

It is as expected. You don't fork a fork.

What you can do is fork the original repo and add as a remote the other fork.

That way, you can fetch/merge from that other fork, while keeping the possibility to make pull request to the original repo.

Upvotes: 2

Related Questions