Updating your team picture/title: a basic Git tutorial

This tutorial serves two purposes. First, to provide you an introduction to how you can use git to store and share snapshots of your work with the team. Second, for you to change your picture on the Group page and update / remove your title (courtesy of Github's random repository name generator).

Git is a version control system. What it does is it lets you save snapshots (called commits) of a given project (called a repository) so you can revert back to previous versions of needed, and so that you can effectively work with a broader team on code by being able to push your changes to others and pull and merge their changes with yours. If you pick up git, you will start using it for a lot of things. Rather than provide a sequence of one-time steps like in the other tutorials, I want to instead provide you with some good tutorials that provide a great introduction and something to look back at as you get more comfortable for more advanced commands. Think of the time you're spending on this as time invested, not just for this research, but for all sorts of things you'll end up doing down the line. I'll make a couple big-picture points:

git is like a programming language for storing, pushing, pulling and manipulating snapshots of your project (its set of files). You start by cloning a project, which just means making a copy of it on your own computer (or on one of our workstations). As you make changes to the project, you make commits, which are basically a snapshot of the current version of all your files. These can then be shared and merged with others' commits.

We will for the most part be using Jupyter notebooks. Unfortunately, these don't work particularly well for merging with others' changes. If you are working with a team, I therefore very strongly encourage you to never work on the same notebook. It's much better to in the jupyter file browser hit the checkbox next to a notebook you want to work on, and click duplicate. When you open the copy, you can click on the title in the top left, and rename e.g. resonance-copy to resonance-ivan. You would then add the new file to the repository (see tutorial) and have the two files side by side that you can both share and refer to.

The way we share repositories is by all pushing our local repostories (on our computer or workstation) to a remote repository hosted on Github.com. You'll therefore have to make an account if you don't have one (you hopefully should already have made one and added your public key to your account. If not, finish working through the tutorials under 'Working on Linux worksations remotely' here first). Also, the first time you make a commit on your computer, you will get an error telling you you need to set your username and email. In the terminal / Powershell, you would type this (replacing your own Github username and email).

                    
                        git config --global user.name "dtamayo"
                        git config --global user.email "myhmcemail@hmc.edu" 
                    
                

To add yourself to the group page, we need to 'fork' the repository of my webpage (that means make a copy of the repository that you can edit) and do three things: First, add a jpg or png of yourself in pix/teampix/, and add the file to the repo (see tutorial below). Then open group.html, and find your name. Just above it, in the img class line, edit the path in src= to "pix/teampix/yourpicfilename.jpg" with whatever name you gave to the file. Also feel free to edit or remove your title below however you see fit. Finally, follow the tutorial below to commit your changes and send me a pull request (a request to merge your changes into the main repository).

There are several great tutorials. I like this one helping you put together your first pull request, which also includes a link to another tutorial with basic git commands that you will use over and over. Let me know if you run into problems.