# How to update fork of old (pre-eclipse) repository?

**URL:** <https://community.konduit.ai/t/how-to-update-fork-of-old-pre-eclipse-repository/383>\
**Category:** Site Feedback\
**Created:** [April 6, 2020, 4:23pm UTC](https://community.konduit.ai/t/how-to-update-fork-of-old-pre-eclipse-repository/383 "2020-04-06T16:23:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![printomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/printomi/32/129_2.png) [@printomi](https://community.konduit.ai/u/printomi)\
**Post date:** [April 6, 2020, 4:23pm UTC](https://community.konduit.ai/t/how-to-update-fork-of-old-pre-eclipse-repository/383/1 "2020-04-06T16:23:10Z")

</div>

Hi, I would like to update my github fork of the old repository, so that I can get started with a pull request about some DL4J-UI issues.  
My last PR was #7336 on Mar 25 2019. Since then, the deeplearing4j repo was moved to eclipse, on Jun 6 2019.  
So in my fork repo, I have renamed remote upstream to old\_upstream, and added the new URL as upstream:

```auto
$ git remote -v
old_upstream https://github.com/deeplearning4j/deeplearning4j.git (fetch)
old_upstream https://github.com/deeplearning4j/deeplearning4j.git (push)
origin https://github.com/printomi/deeplearning4j.git (fetch)
origin https://github.com/printomi/deeplearning4j.git (push)
upstream https://github.com/eclipse/deeplearning4j.git (fetch)
upstream https://github.com/eclipse/deeplearning4j.git (push)

```

Then, I fetched upstream and merged `upstream/_old/master`.

```auto
$ git merge upstream/_old/master
...
$ git status
 On branch master
 Your branch and 'origin/master' have diverged,
 and have 285 and 3 different commits each, respectively.
   (use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean

```

Then, I tried to merge `upstream/master`, but this didn’t work:

```auto
$ git merge upstream/master
fatal: refusing to merge unrelated histories

```

How can I get to `upstream/master` from this state?  
Or do I have to delete my fork and fork the new eclipse repo?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)\
**Post date:** [April 6, 2020, 5:02pm UTC](https://community.konduit.ai/t/how-to-update-fork-of-old-pre-eclipse-repository/383/2 "2020-04-06T17:02:02Z")

</div>

When DL4J was donated to Eclipse, the history of the repo was lost, so you can’t do it that way.

So, you will have to start over from a new fork. You can however extract your own changes in a patch format, and then apply them again after cloning the new fork.

---

<div class="post-metadata">

**Author:** ![printomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/printomi/32/129_2.png) [@printomi](https://community.konduit.ai/u/printomi)\
**Post date:** [April 6, 2020, 7:30pm UTC](https://community.konduit.ai/t/how-to-update-fork-of-old-pre-eclipse-repository/383/3 "2020-04-06T19:30:56Z")

</div>

I have not made any changes since my last PR. I will start working when I get to an up-to-date code.  
The problem is that I can’t make a second fork (this is a limitation of my github account).

Is there any way to transform my fork to a form that can be merged to eclipse/deeplearning4j?

---

<div class="post-metadata">

**Author:** ![printomi](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/printomi/32/129_2.png) [@printomi](https://community.konduit.ai/u/printomi)\
**Post date:** [April 6, 2020, 7:42pm UTC](https://community.konduit.ai/t/how-to-update-fork-of-old-pre-eclipse-repository/383/4 "2020-04-06T19:42:55Z")

</div>

I found what I was looking for: hard reset to upstream/master:

```auto
$ git reset --hard upstream/master

```

> <https://stackoverflow.com/questions/9646167/clean-up-a-fork-and-restart-it-from-the-upstream/9646323#9646323>

Thanks for the help, @treo
