Materials for UW Bothell professors and students to weave `git` into CSSE curricula.
This project is maintained by t4guw
git
?git
is version control software.
It lets you track and record changes that you make to a project you’re working on.
GitHub is a platform that lets you back up your project to the cloud.
It can store any project that you are using git
with.
In this case, you’ll use git
and GitHub to upload homework assignments. Your
professor will be able to see your work, grade it automatically, and
give you feedback on your code. Some feedback will be provided each
time you send new changes to GitHub.
git
If you use a package manager (like brew
on MacOS or apt
on Debian-based Linux),
you can install git
with that package manager.
You can also install git
for any operating system from the
official website.
You can work on a project using any IDE or text editor you choose. You can add almost any type of file you might need to a project – code files, plain text files, images, audio files, and even PDFs and PowerPoint presentations.
git
can track all of these files, but you, the user, have to tell the
software when you’re ready to save the changes you’ve made to the project.
Saving changes in a project is called committing.
Here’s how the commit process works:
As the user, you also have to tell git
when you’re ready to display
your commits on GitHub so that professors and graders can see your work.
A typical workflow that you will be using to complete your assignments:
Documents
folder called code
for all your school coding assignments, and
put each of your assignments in that folder.git
doesn’t care about how you
make changes to the project, only which changes you make.git
will only
commit changes to files that you explicitly want, so you have to tell
git
what changes to commit. In the command line, you use the command git add
.git
repository, you can tell git
to record those changes
to your code in a commit.You can repeat steps 3-6 as many times as you like.
push
our code to the cloud.
If you need any more referece material, refer to: https://github.com/UWB-ACM/Git-Gud-Workshop and review the powerpoint slides.
Why do I need to save my assignments to
git
specifically? Don’t my code files already get saved to my computer?
Mechanically speaking, git
doesn’t automatically assume that you’re ready to commit your changes every time you save changes to the files that you’re working on (ie write those changes to your computer’s hard drive). git
also doesn’t track changes to your entire computer, only the specific projects that you tell it to track. So, even if you save your code when you’re working in an IDE or text editor, you have to take the extra step to tell git
that you’re ready to upload those changes to GitHub.
Why are we using GitHub at all?
There are a few reasons why we’ve decided to use git
for homework assignments in classes at UW Bothell. The biggest reasons are:
git
is used by 85% of professional software engineers; knowing how to use this essential tool will help you be productive in your job and internship searches./** */
) in all of your Java classes. Getting this feedback quickly will help you know what you need to work on to get the best grade you can for that assignment.How do I learn more about using
git
?
At UW Bothell, the ACM student club hosts git
workshops during most academic quarters, and has a community of fellow students that can help you get familiar with git
.
There are a ton of good resources online about what makes git
a powerful tool for developers. We have listed a few great resources for starting to learn how to use this software. Most of these guides are geared toward the command line.
git
and GitHub. It’s a great way to learn the basics, and each exercise gives you immediate feedback on what you did well at, and tells you what you need to work on.