# Can Versions.toml point to git branch instead of fixed git commit?

**URL:** <https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 16, 2020, 2:45pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442 "2020-01-16T14:45:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [January 16, 2020, 2:45pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/1 "2020-01-16T14:45:01Z")

</div>

for creating one’s own registry one has to specify `Versions.toml` for each package

currently it seems like you have to link versions to concrete git commits via hash, however for development it would be very helpful to link to branches instead.

Is this already possible?  
can this be enabled?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [January 16, 2020, 2:58pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/2 "2020-01-16T14:58:46Z")

</div>

If you dev a package then it only needs the path, not anything else.

---

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [January 16, 2020, 3:05pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/3 "2020-01-16T15:05:45Z")

</div>

true, however I for developing in a shared environment (cross OS, cross Machine, cross user)  
a registry is useful for sharing

in the registry I need to specify versions for things to work at all, even if I don’t have any stable version yet.

It would be super natural to instead point the registry directly to a develop branch (or master) so that people can try out my develop version by just taking my registry and everything works as normal.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [January 16, 2020, 3:09pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/4 "2020-01-16T15:09:05Z")

</div>

Thats why you can add by a branch, then `$ pkg update` will automatically follow that branch. The purpose of the registry is to hold information about releases, not floating targets like a branch.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [January 16, 2020, 3:21pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/5 "2020-01-16T15:21:28Z")

</div>

Might be cool to allow instantiating a manifest with dev’d packages and let it automatically check them out on the indicated branch. Agree that putting branches in the registry is not the way to go.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [January 16, 2020, 3:24pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/6 "2020-01-16T15:24:06Z")

</div>

Yea, that is basically [Automatically detect unregistered dependencies by 00vareladavid · Pull Request #1088 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/pull/1088).

Another thing that I have used a bit is to include the package in a registry, without any versions. That at least allows for e.g. `$ pkg add UnregisteredPackage#branch` etc, which is pretty handy.

---

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [January 16, 2020, 4:47pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/7 "2020-01-16T16:47:17Z")

</div>

Okay, now that [https://github.com/JuliaLang/Pkg.jl/issues/1005](https://github.com/JuliaLang/Pkg.jl/issues/1005) is going to be solved things look different.

Still there is the following problem:

- when relying on a manifest file to share the dependencies, it should stay somehow fixed for every package
- still I want to develop certain packages, henc `dev`them, which will change the manifest of my current project

What I imagine is solving this is

- on the single packages I can `add git:mydepencency#master`
- when wanting to `dev git:mydepency` I rather use another project like ‘main’ or the default `julia1.3` project or similar and `dev git:mydependency` there
- is guaranteed that when running things from ‘main’ that also the subpackages refer to the package in development (which may not yet have been pushed to master)?
- the only way to get that manifest on different machines is to version control it, however this conflicts with the fact that in development you rather often may want to `dev` parts of your project, hence changing the manifest file

---

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [January 16, 2020, 4:51pm UTC](https://discourse.julialang.org/t/can-versions-toml-point-to-git-branch-instead-of-fixed-git-commit/33442/8 "2020-01-16T16:51:11Z")

</div>

I tried having a registry without any versions, however this failed immediately for adding packages which have other private packages in their dependencies (something like “no suitable version could be found for dependency …” was raised, which at least makes sense as no version is given)

EDIT: this brought me to a different approach to be able to better use registries also for initial development phase. Please see [Registry: support resolving dependencies also when Versions.toml file is empty by using master](https://discourse.julialang.org/t/registry-support-resolving-dependencies-also-when-versions-toml-file-is-empty-by-using-master/33446)
