Here are some guidelines you should follow when using GitHub for project hosting.
Your GitHub account name should identify you in a professional way. Ideally, you will have the same name for your GitHub account, GMail account, LinkedIn account, TechHui account, and so forth. In my case, I chose “philipmjohnson” as the account name for all of the above services.
Avoid a name that would be potentially embarrassing when seen by future employers (madhackerskillz, etc.).
It’s easy to do, and enables you to provide a (professional) picture as well as a link to your professional portfolio:
Windows uses a different line ending character(s) than Mac/Unix, which can cause problems for collaboration. To fix this, you should follow the instructions in Dealing with Line Endings. Essentially, you will need to set the git auto.crlf property to a value appropriate for your platform. To see whether you have set this property already, you can invoke the following to obtain a list of all your configuration settings:
git config --list
If you are just setting this property for the first time, then it is advisable for you to delete any of your local repositories that you are sharing with other developers, and re-clone them from GitHub. That ensures that automatic management of line endings will take effect.
All projects should have a top-level README.md file. In the case of Play applications, you will want to rename the README file to README.md, then edit the file to document your project using GitHub Flavored Markdown format. Your README.md file should contain:
To include screen images, you can create a directory called “doc” at the top- level of your project and put your image files in there.
All projects should have a top-level LICENSE file that indicates the license attached to your source code. GitHub has support for licensing, see Choosing an Open Source License for details.
“Derived” files are files and directories that are the product of compilation/execution (or can in some way be generated from the “Source” files). Examples of derived files and directories are:
If a derived file or directory shows up in the list to be committed to GitHub, you need to edit your .gitignore file to remove it from consideration:
Sometimes you will mistakenly commit derived files and directories to GitHub. Fortunately, this is easy to fix:
If, for some reason, you do not have a .gitignore file, you can find a template version here.
Unfortunately, the “eclipse” command in the Play console generates .project and .classpath files containing hard-coded paths to the location of your play framework installation. You must not commit these files. If you do, then when another developer downloads your project, they will not be able to use Eclipse because it will load the wrong information. Make sure that .project and .classpath are in the .gitignore file when developing Play applications. Sometimes you will mistakenly commit the .project and .classpath files to GitHub. Fortunately, this is easy to fix:
If, for some reason, you do not have a .gitignore file, you can find a template version here.
A common newbie mistake is to commit the directory containing your project, not the contents of the directory containing your project.
The default GitHub project interface is useful for fellow developers, but can be somewhat overwhelming to simple users of your application:
To provide a more end-user friendly experience, create a GitHub “page” for your site. You can choose to use the README.md file as the content. This strips out much of the complexity and enables your end-users to focus on the important parts of your documentation:
The GitHub page is useless if no one can find it. To make it easily available, edit the “Description” area at the top of your repo page and put the GitHub page url in the “website” field.
There are the “mechanics” of collaboration, which involves ways to share and contribute code as a group. Beyond these mechanics is the “meaning” of collaboration, which is to work together to create high quality, useful software. To help you move beyond “mechanics” and toward “meaning”, you should observe at least the following: