A Workflow for regular Lab Assignments
Sometimes it is easier just to commit to the main branch.
Now that we've gotten this far you know enough to start working on regular lab assignments! Here's a basic workflow that works well as long as you're just 2-3 people.
- One of you, create a remote repository, either through Github.com or in GitKraken using !kbd[!ctrl+I].
- Add the starter files from the assignment, as well as a
.gitignore
. Github has wonderful templates for pretty much every language out there. Use one of them! - Clone your repo to your computer(s)
- Start editing your files, remember to commit often, and remember to push your commits! Solve merge conflicts as they arise and enjoy Git!
It is that simple! As long as you follow these steps, you'll be collaborating easily, safe in the knowledge that your history is preserved and your project is backed up.
Make sure that the repos for school assignments are private.
Having your assignment solutions publicly available is considered cheating. This can result in disciplinary action.
This is all you need to know when using Git for your regular lab assignments. Of course, there are a whole bunch of features that we haven't covered yet. Like branching, rebasing, and GitHub features like issues and pull requests. If you're interested try to learn these on your own, however, they are not at all necessary for working on regular programming assignments.