Lesson 1 Flashcards

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

How to compare files in mac using diff?

A

diff -u file1 file2
- = means that the line was removed
+ = means that the line was added

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

How to look for commits and compare them?

A

cd (directory path)
git log –stat
git diff commitId1 commitId2

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

How to run the files of an older commit

A

git checkout idcommit

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

How to initialize a repository?

A

1) Go to the directory
2) git init
3) To look at the files in the directory ls -a

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

Commit message strucutre

A

A commit messages consists of three distinct parts separated by a blank line: the title, an optional body and an optional footer

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

Commit type

A

The Type
The type is contained within the title and can be one of these types:

feat: a new feature
fix: a bug fix
docs: changes to documentation
style: formatting, missing semi colons, etc; no code change
refactor: refactoring production code
test: adding tests, refactoring test; no production code change
chore: updating build tasks, package manager configs, etc; no production code change

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

Commit subject

A

Subjects should be no greater than 50 characters, should begin with a capital letter and do not end with a period.

Use an imperative tone to describe what a commit does, rather than what it did. For example, use change

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

How to create a branch

A

git branch easy-mode

git checkout easy-mode

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

How to write a commit?

A

git commit -m “Commit message”

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

What is a repository?

A
  • Is a directory with some metadata files about the history of the directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the stage area?

A
  • Is the area were you specify the changes that are going to be commited. To add a file to the stage area use git add
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to compare the working directory and the staging area?

A
  • Use git diff with no arguments.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a remote?

A

Is where you store the location of a repository you would like to communite with. In remotes yo send and receive commits

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

What is origin

A

Is the name of the remote

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