Moving a new package to GitHub

I’m getting ready to upload my little experimental package to GitHub, though still not read to publish it to the world. Any free advice? And how do I separate tooling I don’t even want to see on GitHub from the package itself?

What do you mean by tooling?

If I understand the question correct. You can use a .gitignore file to exclude files or folders from git. Here is an example
Makie.jl/.gitignore at master · MakieOrg/Makie.jl · GitHub

Another solution is to place the tooling out side the git folder.

Maybe you can look through a guide on how to use git and github. This is not anything specific for julia.

Hi. About uploading to GitHub without “publishing it to the world” you may mean:

a) Keeping it private because you don’t want other people to see it or use it. See Setting repository visibility - GitHub Docs.

b) Keeping it unregistered, because you don’t mind others to see it and use it (and even help you to improve it!), but it is in a very experimental stage or not meant to be part of the general Julia registry. In that case you don’t have to do anything special after uploading it to GitHub.

1 Like

I have a whole bunch of bits and pieces that don’t belong on GitHub, quick test scripts and such. I’ve also got pieces that belong in branches. I’m trying to figure out how to organize this pile of stuff.

Use git add to add only the files that you want on Github. Usually Manifest.toml files in packages are not added to the commit and they are instead added to the .gitignore file (which should be added with git add). Depending on what your tests look like, it is usually considered good practice to include some tests in the package. Note also, that it is not always necessary to have packages hosted on foreign machines such as Github, Julia can easily use packages that simply reside on your local hard disk.

I’m guessing that you are not yet at the stage where you would be adding your project to a registry, but if you are, note that you can make your own registry with
GitHub - GunnarFarneback/LocalRegistry.jl: Create and maintain local registries for Julia packages. if this is more relevant than adding your package to the General registry.

1 Like

Thanks! That does help. I’m just going to have to sort through the thing, I think.