Step 1: Setting up the Repository (and Maybe a GitHub Organisation)
First, consider how large you are expecting your project to be. If you are expecting to have several repositories then you may want to use a GitHub organisation, which can be
created via the little plus icon at the top right. This is not a requirement for allowing others to contribute to your project, you can use a personal repo just as easily. Whichever you choose, you will need to
create a repo for your project, this can be done on the website from the same plus icon. To have it as part of your organisation (if you made one) use the drop-down box under 'owner'.
Don't worry too much about the name of your repo, you can change it later. You can also transfer ownership to an organisation should you change your mind (look under settings near the top of the repository's page, it will be at the bottom of settings in the 'Danger Zone').
If you already have a local repository on your computer then leave "Initialize this repository with a README" unticked and leave license and .gitignore as none. The repo will give you instructions on how to push an existing repository.
If you do not have a local repo yet then you can tick the "Initialize this repository with a README" box, keep
license and
.gitignore as none, we will do those later.
If you forgot to tick the readme box and do not have a local repo to push yet, then click on README in the quick setup section of your repo.
You can now clone your repo like normal (see instructions above as required).
Step 2: Preparing for Others
A well organised and clean repo makes life easier for everyone who uses it. This is one of the uses of
.gitignore files, which basically tells git what files extensions to not include in the repo commits despite that the file is in the repo's file tree. Simply create a file called
.gitignore in the root of the repo and add file names which you want git to ignore. Wildcards (*) are accepted as well as folders through forward slashes (/). I find this
website very useful for generating
.gitignore files, here is one I preconfigured which should be fine for ComputerCraft projects:
https://www.gitignor...macos%2Cwindows
.gitignore files are surprisingly flexible, you can ignore some files in one folder but include them in another, ignore a file unless it's in a folder as well as ignore everything but a defined selection of files.
https://git-scm.com/docs/gitignore
https://help.github....ignoring-files/
Licensing, this sounds more complicated than it is. I've made a
tutorial for choosing a license already, don't worry it's shorter than what you have read already and doesn't have any domain terms. Once you have your license, paste it into a file at the root of your repo named
license. Make sure that the license allows people to adapt and edit your code, if people are not legally allowed to have a copy of your code and edit it then they can't contribute. Some countries have automatic 'all rights reserved' licensing which means that not having a license is NOT the same as allowing everyone to do anything with your code.
Mentioning contributing, joining instructions are useful. You may want to create a file named
CONTRIBUTING which will contain guidelines to how people should help in the project. You may want to link to a code of Conduct or similar here, as well as style guidelines for code and documentation, and bug reporting instructions. Google can be a good resource here if you need ideas.
You may also want to create a
todo list, it's difficult to help when you don't know what needs doing. Markdown is good for lists.
Being able to communicate makes cooperating easier, you may want to set up a
Gitter room for this. It integrates with Github, so you already have an account.
Step 3: What is the Project?
Only you know what your project is about, so this next part is going to tell others how they can help. Your
readme file is what people will see first, put a general overview and the goals of your project at the top. Follow this with more details so that potential collaborators can get a better idea about your project. It will end up being similar to the forum post you will make when you release your program. When your program is ready you may want to add download and install instructions in the
readme.
Step 4: Work and Wait
Keeping yourself motivated is quite possibly the most difficult part. Having other people working with you can be a motivator, but those same people will not be interested in helping the project if its leader, you, are not doing anything. Remember to tick things off the to-do list as you complete them, seeing the number of things to do shrink and the list of done things grow can also be a source of motivation. You may find that once you have a working version of your project that people will be more willing to help.
Some of this is covered in GitHub's own guide:
https://help.github....o-your-project/