# How to use a forked Github project

**URL:** <https://discourse.julialang.org/t/how-to-use-a-forked-github-project/57360>\
**Category:** General Usage\
**Created:** [March 17, 2021, 4:56am UTC](https://discourse.julialang.org/t/how-to-use-a-forked-github-project/57360 "2021-03-17T04:56:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultradian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultradian/32/17802_2.png) [@ultradian](https://discourse.julialang.org/u/ultradian)\
**Post date:** [March 17, 2021, 4:56am UTC](https://discourse.julialang.org/t/how-to-use-a-forked-github-project/57360/1 "2021-03-17T04:56:33Z")

</div>

I am trying to use a fork of the [Ogg](https://github.com/staticfloat/Ogg.jl) package, but having problems. Ogg itself is easy to use as it is a registered package. The fork I want to use is `https://github.com/ssfrr/Ogg.jl` as ssfrr created a `streaming` branch that allows access to specific OggPages. I first tried to clone the repo and use `activate` as described at [4. Working with Environments · Pkg.jl](https://pkgdocs.julialang.org/v1/environments/#Using-someone-else's-project), but then found I couldn’t build or test as there was no `Project.toml` in the forked version.

So what is the best way for me to proceed? Do I create a new `Project.toml` file and new `uuid` for the cloned fork? Or, do I use the registered version of Ogg and use `]dev` as described at `https://pkgdocs.julialang.org/v1/managing-packages/#developing` ? I actually tried the latter, but still ran into issues where I would get problems building, with

```julia
ERROR: LoadError: libogg not properly installed. Please run Pkg.build("Ogg")

ERROR: LoadError: Failed to precompile Ogg [796d8c31-69d0-5366-9081-a3bf997f4f0d] to ~/julia/julia-depot/compiled/v1.5/Ogg/CEzZT_9qSkO.ji.   

```

---

<div class="post-metadata">

**Author:** ![marius311](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius311/32/3953_2.png) [@marius311](https://discourse.julialang.org/u/marius311)\
**Post date:** [March 17, 2021, 7:46am UTC](https://discourse.julialang.org/t/how-to-use-a-forked-github-project/57360/2 "2021-03-17T07:46:48Z")

</div>

The answer to the question in your title is straightforward, you can do:

```julia
pkg> add https://github.com/ssfrr/Ogg.jl.git#streaming

```

As to why this specific branch of this fork is not working, it may just be that that branch hasn’t received an update in 2 years. The most recent version of Julia that it compiles/loads succesfully on seems to be 1.1 (`docker run -it julia:X.Y` where you can put any version for `X.Y` can be really helpful in super quickly testing different versions).

The easiest path forward may be to clone the fork and manually merge Ogg.jl’s current `master` branch (which is more up to date and seems to work on 1.6) into `streaming`. I’m not familiar with the package so can’t say how hard resolving any merge conflicts may be though.

---

<div class="post-metadata">

**Author:** ![ultradian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultradian/32/17802_2.png) [@ultradian](https://discourse.julialang.org/u/ultradian)\
**Post date:** [March 20, 2021, 11:12pm UTC](https://discourse.julialang.org/t/how-to-use-a-forked-github-project/57360/3 "2021-03-20T23:12:55Z")

</div>

@marius311 That is a great tip about using docker for testing different versions. I got the errors above when I created a `dev` version from the registered and started trying to merge in the changes from the `streaming` branch. After you pointed out that it functions in versions 1.1, I figured out that the divergence happened at 1.3, and merged everything successfully.

I’m marking this solved as you got me where I wanted to be, although I am wondering if I should have followed your advice to do things in the opposite order and clone the branch, then merge in the changes from the up to date, registered version. I’m not sure which repo is the more appropriate place to submit a PR if I make some useful changes.
