GIT Flashcards

1
Q

What is GIT?

A

Git is a Distributed Version Control system (DVCS). It can track changes to a file and allows you to revert back to any particular change.

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

What is ‘head’ in git and how many heads can be created in a repository?

A

A ‘head’ is simply a reference to a commit object. In every repository, there is a default head referred as “Master”. A repository can contain any number of heads.

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

What are Git repository hosting services you used?

A

Github, Bitbucket, Gitlab or you can specify if you have used something else here.

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

Describe: reset, rebase, checkout, merge

A

RESET resets (unstages) changes added to the index; undoes git add. discard all working copy changes since the last commit

REBASE is used to rewrite previously made commit objects.

CHECKOUT switch branches create a new branch and switch to it

MERGE merges together different branches (different histories, to be more exact)

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

Describe: add, commit, push

A

ADD adds your modified files to the queue to be committed later. Files are not committed

COMMIT commits the files that have been added and creates a new revision with a log… If you do not add any files, git will not commit anything. You can combine both actions with git commit -a

PUSH pushes your changes to the remote repository.

Shorter:
git add selects changes
git commit records changes LOCALLY
git push shares changes

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

What is a conflict

A

Conflict is when two commit objects have some changes in the same place

Longer: A ‘conflict’ arises when the commit that has to be merged has some change in one place, and the current commit also has a change at the same place.

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

git stash

A

git stash: a Clipboard for Your Changes

The “git stash” command can help you to (temporarily but safely) store your uncommitted local changes - and leave you with a clean working copy.

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

What Are The Advantages Of Using Git?

A

a) Data redundancy and replication
b) High availability
c) Only one.git directory per repository
d) Superior disk utilization and network performance
e) Collaboration friendly
f) Any sort of projects can use GIT

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