In Julia 0.6 (the current stable version that you most likely are using), you can add registered package such as XGrad just as:
Pkg.add("XGrad")
or clone the master branch using (also works for unregistered packages):
Pkg.clone("https://github.com/dfdx/XGrad.jl")
This puts the whole git repository of the package somewhere on your disk, e.g. on Linux the default location is ~/.julia/v0.6/XGrad
.
Espresso.jl is a dependency of XGrad.jl and is installed automatically into similar location, e.g. ~/.julia/v0.6/Espresso
.
Once you get both of the packages, you can enter the directory of the project and, since it’s still a git repo, switch to the branch you want. Again, in Linux you can do it as:
cd ~/.julia/v0.6/XGrad
git checkout julia-0.6
cd ~/.julia/v0.6/Espresso
git checkout julia-0.6
Alternatively, you can switch a branch right from julia console as follows:
Pkg.checkout("XGrad", "julia-0.6")
Pkg.checkout("Espresso", "julia-0.6")
which should also work on Windows.
In Julia 0.7 things are a bit different, but I won’t describe it for now to not overload you with too much information.