I am currently writing a .ipynb notebook and want to use a specific branch of a package, but the "using" command always redirects to the master branch.
I tried to add the branch using:
Pkg.add(url="https://gitlab.com/somename/Packagename.git#shaofpackage")
Using status, I can verify that the package is present. If I use
using Packagename
it relates to the official package (i.e. the master branch), instead of the branch which I specified with #shaofpackage. Is there someway to name my branch in the add-command?
Any help or redirection would be really helpful. Thanks a lot :)
To address your question more specifically, the issue is that you do not want the "#shaofpackage", you want "#branchname".
The following is one way to approach this:
using Pkg
Pkg.add(url="https://github.com/JuliaWeb/GitHub.jl.git#master")
Pkg.status()
Pkg.status()
should show (in my case):
[bc5e4493] GitHub v5.7.3 https://github.com/JuliaWeb/GitHub.jl.git#master
Note that "#master" is referring to the branch name you want to install. I verified I could see code only in the master branch and not in the most recent tag through this workflow.