# Week 2 - Office Hours - Basic Process

### Chapter 15 - New project, GitHub first

<figure><img src="https://3364608434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LD2B3y86yJyNeihFLqD%2Fuploads%2FVTt613l8JTEgdaELJpYE%2Fimage.png?alt=media&#x26;token=39d56681-4a12-49af-9c4e-3f580337bcd3" alt=""><figcaption></figcaption></figure>

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](#in-the-terminal).
* Repeat 15.3-15.7 [in SourceTree](#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

<figure><img src="https://3364608434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LD2B3y86yJyNeihFLqD%2Fuploads%2FxJ2WuLvD3YECUU9DAife%2FSourceTree_layout.png?alt=media&#x26;token=6e56f9f8-c712-4d9a-9fb5-f2d8dffeb427" alt=""><figcaption></figcaption></figure>

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
