It can be tempting to include code you wrote as part of a course project or assignment in a professional portfolio (e.g., on Github). Keep in mind that if you do this, it constitutes "publishing" your work (as you are making it publicly available) and there are a few issues you should be aware of related to this practice.
First, for projects that involve starter code, the starter code is owned by the course instructor, so it's very important for you to clearly identify the parts of the code that were provided to you (and their source) as well as the parts that you wrote yourself. You also need to request permission from your course instructor. As you can guess, this can make such projects less appealing as evidence of your coding skills because prospective employers can immediately see how much of the code was your original creation. Some projects will involve making relatively few changes to a large code base.
Second, we cannot rule out the possibility that projects are reused in future course offerings – even in a modified form. If other students find publicly-available code that is relevant, some students will be tempted to use it. In that case, it is possible that you may be contacted as part of an academic misconduct investigation. To protect yourself, we suggest that you make public only small samples of your project (with course instructor permission) with instructions on how to contact you to find out more. This way, you can still provide all the evidence you want to potential employers, while ensuring that your work remains inaccessible to others for misuse.