Git Basics Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Create an empty git repo

A

git init

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

Clone repo located at onto a local machine.

Original repo can be located on the local filesystem or on a remote machine via HTTP or SSH

A

git clone

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

Define author name to be used for all commits in current repo

A

git config

user.name

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

Stage all changes in for the next commit.

Replace with a to change a specific file

A

git add

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

Commit the staged snapshot, but instead of launching a text editor use as the commit message

A

git commit -m

“”

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

List which files are staged, unstaged, and untracked

A

git status

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

Display the entire commit history using the default format

A

git log

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

Show unstaged changes between your index and working directory

A

git diff

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