I created a package using
PkgTemplates. I put it in
.julia/dev and then added it to my primary environment for development purposes.
Now when I change and git commit the files, it’s still pulling old commits that aren’t working. I think this is because I typed
]add ~/.julia/dev/MyNewPackage when I meant to type
]dev ~/.julia/dev/MyNewPackage. How can I reverse this, preferably without deleting any files?
When you say that “it’s still pulling old commits that aren’t working”, do you mean that Julia does not use the latest changes you make on your code?
If that’s the problem, it should be solved by just typing
]dev ~./julia/dev/MyNewPackage, as you already suggested. Having
add-ed it before shouldn’t matter.
… Unless what happens is that the files that you are editing are not the ones in the folder you referred to with
dev. When you
update a package, a copy of the code is also put in
.julia/packages. But those copies are not git repositories, so I don’t think that the problem is there. In any case, check that the repo you edit is the one you referred when you type
Just in case, also use Revise.jl if you want to see the effect of code changes without restarting Julia.
Just do the
] dev... again. If u update code on another computer then go to the folder in bash or git bash on Windows and do a
The solution was almost what you both described, but I actually had to type
]develop ~./julia/dev/MyNewPackage instead of
]dev didn’t seem to want to work with local paths on my machine for reasons that are unclear to me. Perhaps one of the Pkg devs can explain what is going on here?