Week 2 - Office Hours - Basic Process

What to do when you start a new project.

Chapter 15 - New project, GitHub first

Instructions:

  • Create a folder that will contain all your files for this course - the course folder.

  • Give your repo a name that refers to this git course.

  • Follow the tutorial up to 15.1.1.

  • Ignore 15.1.1, 15.1.2, 15.2.

  • Run git clone <https-address-of-your-new-repo>.

  • Follow the tutorial from 15.3 until the end skipping only GitLab/BitBucket stuff.

  • Repeat 15.3-15.7 in the terminal.

  • Repeat 15.3-15.7 in SourceTree.

In the Terminal

Edit and save README.md in RStudio or any other editor.

Go to the terminal and do the following instead of the list in the tutorial:

  1. git diff -- README.md . Look at the output. Does it make sense to you?

  2. git add -- README.md

  3. git status. Look at the output. Does it make sense to you?

  4. git commit -m "edit README.md"

In SourceTree

  1. Open SourceTree.

  2. File -> Open -> Select the folder with the repo -> Open.

  3. On the left, click "File status".

  4. To the right of "Pending files, sorted by status" there is a symbol with a drop-down arrow. Click it and select "Split view staging". There should be two areas one under another: one has "Staged files" above it, and the other one - "Unstaged files". We will refer to these areas as staging area and working tree changes area (please, come up with a shorter name, please).

  5. Edit "README.md" again by changing an existing line and adding a new one.

  6. The file should pop up in the working tree changes area. Click on it. Look at what comes up in the right half - we'll call that one "diff preview". Some of the lines are highlighted in green and red. What does it tell you?

  7. Check the READMe.md file under the "Unstaged Files" area - the file should move to the staging area.

  8. Click on the tiny area at the bottom - the commit area. Enter your commit message and press "Commit".

  9. Click on "History" in the left column. Click on each line one by one and see each change.

Chapters 16, 17 - Skip for Now

Last updated