+ -
Notes for current slide
Notes for next slide

~ how to use Terminal App
(aka the command line) ~

1 / 17

The 4 most commonly used commands:

2 / 17

cd = change directory

The cd command is what you use to move around your computer on the command line:

$ cd /Users/mark/Documents/

or more concisely

$ cd ~/Documents/

the tilde (~) is a shortcut for the home directory e.g. /Users/<user>

3 / 17

ls = list files

The ls command shows you all the files that are in the current directory you are in.

$ ls
assets hii.jpg index.html test.html
4 / 17

mkdir = make directory

The mkdir command creates a new folder

$ mkdir test
$ ls
assets hii.jpg index.html test.html test
5 / 17

rm = remove

The rm command removes or deletes files.

$ rm test.html
$ ls
assets hii.jpg index.html test

note: unlike moving things to the trash, when you rm something it is immediately deleted permantely!

6 / 17

There are a lot more commands you can use, but these 4 should get us started : )

7 / 17

~ how to use git ~

8 / 17

About git

Git is a version control system— but don't worry about what that might mean for now!

All you need to know is that git helps you keep track of the changes you make to code, see the history of changes you've made, and collaborate with others in a structured way.

9 / 17

github.com

Github is a place where you can host your projects. Git and github use the term repositories to refer to the folder that contains your code.

It has social aspects, and is where the vast majority of open source code is stored.

Let's:

10 / 17

explain open source
Go to github and create accounts~

The clone command

The first command we can use with our newly created repository on github.com..

$ git clone <repository url>

The clone command is an initial command you use when getting a new repository, like the one we just created.

11 / 17

The status command

The status command is kind of similar to the ls command, except it only shows you files that git hasn't seen before or that have changed since git last saw them:

$ git status
12 / 17

Open code editor, crate a new file, and then run git status

The add command

The add command tells git to add the files that you specify to your git project.

Git will then know to look for those files in the future, and see if there are any changes to them.

$ git add index.html
13 / 17

discuss how added files are only staged

The commit command

The commit command saves the files that you've added — or the changes to files that you've added previously — to the repository.

$ git commit -m"Add index.html"

note: the -m"<message>" command is important to include, this is the commit message, that will help you understand in the future what the files or changes you're saving are. It's important to always specify a message, even if it's simple: -m"Fixed a bug"

14 / 17

The push command

This command sends the work we've done locally to the hosted repository on github.com. This is an important step to both back up your work, and allow for others to use your code.

$ git push
15 / 17

The diff command

The diff command shows you what changes you've made if any to the files that are tracked by git.

$ git diff

If you've made a lot of changes, it can be helpful to look at them one at a time by using status and diff together:

$ git status

to see what files have changed, and then:

$ git diff index.html
16 / 17

The log command

The log command shows the the history — or all the times you've used commit — within your project.

$ git log
17 / 17

The 4 most commonly used commands:

2 / 17
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
s Start & Stop the presentation timer
t Reset the presentation timer
?, h Toggle this help
Esc Back to slideshow