Git Flashcards

1
Q

What does the “origin” remote repo represent in a local Git Repository?

A

The remote repo from which you cloned the repo.

The origin from which –

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

What defines a common directory as a Git repository?

A

The presence of a “.git” subdirectory

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

Que fait la commande “git log”?

A

Liste des soumissions faites dans le dépôt

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

What should we add at the end of our files

A

A line break, so that our diffs don’t contain irrelevant information

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

What do commits contain?

A

Message
Author
Date
Files (Changes)

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

What does “git push -f” does?

A

Forces local changes to the remote repo (dangerous)

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

When are you in “detached head” when working with git?

A

When you checkout a commit that is not the most recent commit of a branch

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

What does the “git tag” command does?

A

Assigns a tag to a revision

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

What does “git stash” does?

A

Takes all changes in working and staging and saves them

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

What is the difference between “reset soft” and “reset mixed”

A

“reset soft” keeps all changes and stage differences

“reset mixed” keeps all changes and does NOT stage differences

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

What is a git reset

A

git reset removes commits in a local repo

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

What is a git revert

A

git revert “reverts” changes (useful for commits that were already pushed to a remote repo)

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

What is a merge fast forward?

A

A merge where no new commit is created. Rather, the commits from the merged branch get added to the top of the targeted branch.

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

What is a merge direction

A

A merge where you merge the master into your own branch to make sure that everything is stable before merging your changes into master.

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

What is Git LFS?

A

Git Large File System

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

What should you use to manage big files in Git (ex: binaries)

A

Use Git LFS

17
Q

What the philosophy behind GitFlow?

A

Work with branches
Have local unstable branches
Have a central STABLE master branch

18
Q

What are the “git flow” commands

A

A cool feature that helps devs implement the git flow philosophy