# Check out tagged commit of unregistered package

**URL:** <https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659>\
**Category:** General Usage\
**Tags:** package, development\
**Created:** [July 5, 2017, 10:00am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659 "2017-07-05T10:00:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kkmann/32/1727_2.png) [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Post date:** [July 5, 2017, 10:00am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/1 "2017-07-05T10:00:58Z")

</div>

Hi,

the title pretty much says it all. I have an unregistered package not ready for being published and would still like to be able to install specific versions using tags.

I know I could use branches via `Pkg.checkout("MyPackage", branch = "0.0.1")` but that is rather hackish as the ‘real’ versioning system relies on tags.

So, after cloning my package, how do I install a tagged version/release?

Best,

Kevin

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [July 5, 2017, 10:37am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/2 "2017-07-05T10:37:54Z")

</div>

I don’t know how to do it in the Julia REPL, but at the command-line (in the directory of the project): `git checkout 0.0.1`

---

<div class="post-metadata">

**Author:** ![kkmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kkmann/32/1727_2.png) [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Post date:** [July 5, 2017, 11:10am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/3 "2017-07-05T11:10:28Z")

</div>

sure, but I was hoping for a method via Pkg.xyz - should be possible, should it not?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2017, 11:39am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/4 "2017-07-05T11:39:07Z")

</div>

You should be able to hack something together by calling `git` with the working directory `Pkg.dir(...)`. Or even using the built-in libgit: see the sources of `Pkg.checkout` and `Entry.checkout`.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [July 5, 2017, 12:04pm UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/5 "2017-07-05T12:04:22Z")

</div>

Both tags and branches are just references to particular git commits, so I don’t think there’s any difference.

You should just be able to write

Pkg.checkout(“package”, “v0. 0.1”)

I believe.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 5, 2017, 12:09pm UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/6 "2017-07-05T12:09:04Z")

</div>

I am not familiar with `LibGit2` internals, but I don’t think it will be that easy ([source](https://github.com/JuliaLang/julia/blob/master/base/pkg/entry.jl#L229)).

---

<div class="post-metadata">

**Author:** ![kkmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kkmann/32/1727_2.png) [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Post date:** [July 5, 2017, 12:39pm UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/7 "2017-07-05T12:39:43Z")

</div>

Thanks for the suggestions, what finally worked for me is:

```
Pkg.clone("MySuperPackage.git")
Pkg.checkout("MySuperPackage", "master@v0.0.1")

```

---

<div class="post-metadata">

**Author:** ![kkmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kkmann/32/1727_2.png) [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Post date:** [July 6, 2017, 7:47am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/8 "2017-07-06T07:47:19Z")

</div>

Okay, that was premature x)

Somehow, in the process of fiddling with Pkg.checkout(), a new branch `master@v0.0.1` was created - and that could be checked out. So this doe not actually solve the problem x). As mentioned earlier, one can use git directly to checkout the tag, but that requires potential users to interact with git directly.

It would be just really cool, if the package system would treat unregistered packages as first-class as well. I really do not want to register my package yet, as I feel that it is very specific and should undergo further testing etc. before being of much interest to others. But it should still be possible to checkout a specific prior release (tag) without fiddling around too much, should it not?

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [July 6, 2017, 7:51am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/9 "2017-07-06T07:51:41Z")

</div>

Didn’t @dpsanders’s suggestion work? You don’t need to specify `master@`, tags exist independently of any branches (that would be the same with the command-line `git`).

---

<div class="post-metadata">

**Author:** ![kkmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kkmann/32/1727_2.png) [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Post date:** [July 6, 2017, 8:23am UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/10 "2017-07-06T08:23:11Z")

</div>

Nope, Error: “There is no tracking information for the current branch”. It does checkout a (new) branch “v0.1.0” though but I would rather not recommend a command which produces an error 😉

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [July 6, 2017, 5:46pm UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/11 "2017-07-06T17:46:59Z")

</div>

I used v0.1.0 (with a v) because that is the Julia convention for tags that is required for the package manager. But if your tag is named 0.1.0 (without a v) then that’s what you should put in the checkout command.

---

<div class="post-metadata">

**Author:** ![kkmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kkmann/32/1727_2.png) [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Post date:** [July 7, 2017, 2:35pm UTC](https://discourse.julialang.org/t/check-out-tagged-commit-of-unregistered-package/4659/12 "2017-07-07T14:35:35Z")

</div>

yeah, I did (and I did tag it as v0.1.0 to be consistent with the Julia naming convention and to not get in trouble when publishing later)
