git Flashcards

1
Q

What is the difference between git pull and git fetch?

A

Git pull command pulls new changes or commits from a particular branch from your central repository and updates your target branch in your local repository.

Git fetch is also used for the same purpose but it works in a slightly different way. When you perform a git fetch, it pulls all new commits from the desired branch and stores it in a new branch in your local repository. If you want to reflect these changes in your target branch, git fetch must be followed with a git merge. Your target branch will only be updated after merging the target branch and fetched branch. Just to make it easy for you, remember the equation below:

Git pull = git fetch + git merge

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

differences between Centralized and Distributed VCS

A

client-server model,
ex.: CVS, Subversion.

peer-to-peer model, Git

The key difference between centralized and distributed VCS’s, in my opinion, revolves around the fact that there is no locking of elements in a distributed system. So every new set of changes that a developer makes is essentially like a new branch of the code, that needs to be merged back into the master repository. In the distributed model, it’s possible for two developers to be working on the same source file at the same time.

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

head

A

The latest revision in the repo.

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

git

A

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

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