Week 1 - Homework - Setup

This week, we'll set up the software and make sure everything is connected and ready to continue with the tutorial. Your task is to follow the instructions in this section in order, and make sure that all the commands here and in the linked parts of the tutorial have worked for you as expected.

Use the TODO list below to check that you didn't miss anything.

TODO:

Chapters 1-6

Feel free to skip.

Chapter 7 - Configuring git

Set default user name and email

Read the first part of the chapter up to the "More about git config" section and then come back.

You might have already set up the default user name and email for git operations. Check with

git config --global --list | grep user.*

If you did set them up earlier, you'd see something like this:

user.name=Zhenya Kalenkovich
user.email=e.kalenkovich@gmail.com

If the email is the email you use on GitHub, you don't need to do anything else. If it isn't, or nothing is printed at all, do follow the instructions in the tutorial on setting the name and the email.

The"git config"commands here and in the tutorial are run with the "--global" flag. In this context, "global" refers to the fact that these settings will apply to all repositories for the current user. There is also a "--system" flag that would set the config options for all users on the computer. When "git config" is run without either of these flags in a folder that is tracked by git, the options will only apply to this one repository.

  • No flag - repository-level.

  • --global - user-level.

  • --system - computer-level.

When options are set at multiple levels, the value at the first level in the order above will be used. So, setting "user.name" with "--global" will mean that git will use your user name even if someone set "user.name" at the "--system" level (which they shouldn't have).

Set the default branch name

Follow the instructions in the Configure the default name for an initial branch section.

Read the chapter, then install SourceTree. It will require you to set up a BitBucket account during the installation - do it, that is expected. Once installed, tell Zhenya to write instructions on configuring SourceTree.

Why SourceTree? GitKraken is great but it isn't free unless you work exclusively with public GitHub repositories. We do use private repositories in BLab so GitKraken is not an option. Plus SourceTree has a feature called split-view staging which is very useful for understanding the basics of how git works. (also, it is what Zhenya is used to working with)

We will be using the terminal and sometimes RStudio to work with git throughout the tutorial. But in the end, we'll also try out using a point-and-click interface for git. Some people prefer to work with the terminal, some prefer GUIs, and many use both - it will be up to you.

Chapter 9 - Connect to GitHub over https

No need to go to the tutorial.

You probably already did this when you Set up Git and GitHub. Run gh auth login to check. Here is how it should go:

$ gh auth login
? What account do you want to log into? GitHub.com
? You're already logged into github.com. Do you want to re-authenticate? No

If you see anything else, go to Set up Git and GitHub and follow the gh auth login instructions.

Chapter 10

Skip

Chapter 11 - Check GitHub Connection

Follow the instructions in the tutorial but skip parts that refer to PAT. If you get any authentication errors, re-authenticate using the instructions in Set up Git and GitHub, not the ones in the tutorial.

Chapter 12 - Connect RStudio to git and GitHub

Follow as is.

Chapters 13, 14 - Troubleshooting RStudio-git connection and

If you've had no issues so far, skip them. If you did have issues, check it out but also slack the Git Support slack channel. It is totally fine if you then find an answer in the tutorial.

Last updated