Skip to content

Version Control Systems

Elbrus edited this page Jun 28, 2022 · 2 revisions
Note: These are questions I faced during the interview process!

Explain the difference between a centralized and distributed version control system (VCS)

The main difference between centralized & decentralized is that a centralized version control system has only one master server, which stores a copy of the project with the necessary information: history of commits, git logs, etc on itself. But decentralized version control system has a lot of middle-points of server/hosts where a copy of the project can be stored with the necessary information, and the actions of developers can be divided: on one host developers can only commit their code, on the next one developer can push or pull changes for the remote repository.

Explain the difference between git fetch and git pull

Git fetch command means that all changes detected in the remote repository can be fetched to the local repository but not merged into local files, but pull means that all changes that have been detected in the remote repository will be merged into local files by replacing information.

What is Git stash?

Git stash is a built-in command with the distributed version control tool in Git that locally stores all the most recent changes in a workspace and resets the state of the workspace to the prior commit state.

What is the difference between Git Merge and Git Rebase

The main point is that merge is used for getting clear and understandable logs, we should use merge if we know that our git logs are important & other teammates will interact with them. But rebase command can be used when we totally sure that git logs are not so important and other people will not interact with them. All things in logs!

Clone this wiki locally