Some Terminal and Git Commands Flashcards

1
Q

“List” - shows files and directories contained in the current directory

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

“Change Directory” - moves you into a new directory

A

cd
cd directory-name
cd .. (to move up a level)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

“Make Directory”

A

mkdir

mkdir new-directory-name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Opening your default code editor (VSCode)

A

code .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Creating a file in a directory (i.e. index.html)

A

touch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Initialize Repo

A

git init

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Adding changes to a repo

A

git add -A

-A means we’re adding all changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Committing your edits to the main branch

A

git commit -m “add a message about what you changed”

This is like saving your work before a boss fight! Commit when things are going well!!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Checking to see if the commit worked

A

git status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Moving commits to GitHub

A

git remote add origin link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Send work to the remote repo

A

git push origin main(or master)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Making a copy of a remote repo to a local repo

A

git clone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Getting most recent changes from remote repo

A

git pull

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Putting your local changes to the side before pulling remote repo

A

git stash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Adding local changes back to a project after stashing

A

git pop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly