Week 2 - Office Hours - Basic Process
What to do when you start a new project.
Last updated
What to do when you start a new project.
Last updated
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.
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:
git diff -- README.md
. Look at the output. Does it make sense to you?
git add -- README.md
git status
. Look at the output. Does it make sense to you?
git commit -m "edit README.md"
Open SourceTree.
File -> Open -> Select the folder with the repo -> Open.
On the left, click "File status".
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).
Edit "README.md" again by changing an existing line and adding a new one.
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?
Check the READMe.md file under the "Unstaged Files" area - the file should move to the staging area.
Click on the tiny area at the bottom - the commit area
. Enter your commit message and press "Commit".
Click on "History" in the left column. Click on each line one by one and see each change.