Throughout CSE 333, you will use GitLab and git for
version control (and collaboration) on exercises and homework. This guide
walks through the one-time setup: connecting your CSE Linux environment to
GitLab, configuring git, and cloning your repositories. Once
you're set up, see the Git Basics guide for
the day-to-day workflow.
If you don't see your repos by then, please contact the instructor(s) ASAP to have them created.
This will allow you to access your repo without having to authenticate every time (i.e., no more typing your password!) and will greatly improve your workflow.
$ cat ~/.ssh/id_ed25519.pub ~/.ssh/id_rsa.pub
$ ssh-keygen -t ed25519 -C "<netid>@cs.washington.edu"
$ cat ~/.ssh/id_ed25519.pub
The git command looks for a file called
.gitconfig in your home directory that holds options
controlling git's behavior. Some commands (e.g.,
commit and push) print verbose warnings if
certain options are unset; the commands below set them.
$ git config --global user.name "<your name>"
$ git config --global user.email "<your netid>@cs.washington.edu"
$ git config --global push.default simple
These only need to be run once per user. They are idempotent operations so running them again does no harm. If you've configured git before, you can skip this section.
The version of your repository that you view through the GitLab web interface is the remote repository. You can clone it to create a local copy.
You will need to clone both your homework repository and your exercise repository. For each,
git@gitlab.cs.washington.edu:cse333-26su-students/cse333-26su-<netid>-ex.git
$ git clone <repo url>This copies the content of the remote repository onto your machine. At the start of the quarter, these repos may be empty.
That's the one-time setup complete. For the day-to-day workflow (pulling, committing, pushing, recovering from mistakes, and tagging commits for submission) continue to the Git Basics guide.