Version Control
Outline
Terminal Review
Version Control
Markdown
{terminal review}
Terminal Review
List files
pwd
Change directory
cd dir-name
Determine where you are in the file system
ls
Make a directory
mkdir dir-name
Terminal exercise
# Navigate to your "Documents" directory
# Create a new directory "quick-exercise"
# Navigate to your "quick-exercise" directory
# Create a file called "test-file.r" using the touch command
# Open "test-file.r" (from the terminal) and edit it
# View the contents of the file in your terminal
# Bonus: Create 10 files with one line
{version control}
Version control
Track changes
Share code
Facilitate collaboration
Go back in time
Without Version Control
How it works
Track all files in a directory (repository)
Identify line-by-line changes
Take snapshots of your files
Share to the cloud for collaboration
Git
Version control software
Free and open source
Enable new terminal commands
Industry standard
Locally
Initialize a project
Add files to track
Take a snapshot/checkpoint of your work
git init
git add *
git commit -m "..."
Repeat these steps each time you make changes
git init
Run in the directory of your project
Creates a hidden .git file that track changes
Allows you to perform other git commands, like git status
git add
Adds files to be tracked in the future
Adds changes to already tracked files
One file (git add filename.r) or all files (git add *)
git commit
Takes a snapshot of added changes
Must include a message (git commit -m "message here")
{but what's GitHub?}
git init
git add *
git commit -m "message"
staging area
files
Local git process
Using Github
Your machine
GitHub
Other machine
Using Github
Your machine
fork
Your copy
Starter repo
git clone
git add *
Edit files
Staging area
git commit -m ".."
git push
Demo
Go to this repository
Fork the repository
Clone your forked repo to your desktop
git clone https://github.com/USERNAME/github-practice/
Demo (con't)
Edit the Readme.md file
Add your changes
Commit your changes
git commit -m "Message goes here"
git add .
Push back to your repo
git push origin master
# github-practice
Add (or remove) some text
{markdown}
Markdown
# Markdown Description
Allows you to apply simple syntax to create
well formatted documents, including the ability to:
- Make text **bold**, *italicized*, or `monospace`
- Have headers
- Create lists
1. Ordered lists
2. Or unordered lists
Markdown Basics
# Header
## Sub-header
...
###### Smallest header
**bold**
*italicized*
~~strikethrough~~
`monospace`
>Here is where you can put an indented quote
```
Multiple lines
Of code
In here
```
Who uses Markdown?
StackOverflow
Viewing Markdown
GitHub renders Readme.md
Assignments
Assignment-1: Git Started(due Wed. 1/13 before class)
version-control
By Michael Freeman
version-control
- 1,601