Version Control System Common Questions – Git, SVN
1) What is the difference between Git and SVN?
|Git is a Decentralized Version Control tool||SVN is a Centralized Version Control tool|
|It belongs to the 3rd generation of Version Control tools||It belongs to the 2nd generation of Version Control tools|
|Clients can clone entire repositories on their local systems||Version history is stored on a server-side repository|
|Commits are possible even if offline||Only online commits are allowed|
|Push/pull operations are faster||Push/pull operations are slower|
|Works are shared automatically by commit||Nothing is shared automatically|
2) What is Git?
Git is a Distributed Version Control System. Thanks to Git, changes to the files and revert back can be done.
As it stores all the versions of the project’s files, it provides many advantages. Of course, if it uses an appropriate project.
Every developer can clone the project to local and it has all the history of the project. For all the negativities and losses, the local project has all the files.
It has a remote repository, central cloud repository, and developers can push the changes to share it with teammates.
3) Which language is used in Git?
Git uses “C” programming language. As “C” programming language reduces the overhead of run times associated with high-level languages, GIT is fast.
4) What are the differences between Git fetch and Git pull?
Git fetch is used for downloading commits, files, etc. from a remote repository. However, it does not integrate into your working files automatically. Fetch is a great functionality to show which changes were done in the remote repository.
Git pull is used for getting new changes and merge them in the active/checkout branch. It includes git fetch inside it. Git Pull is not only downloads new data like git fetch but also directly integrated it into the current branch.
5) What is the difference between fork, branch, and clone?
Forking is a copy of the repository without affecting the original project. However, it is a remote, server-side copy of the repository.
Cloning is not a fork, it is a local copy of the remote repository. When a repository clones, the entire source, all the history, and branches are copied.
Branching is a feature of the version control system. It can be said that it is part of the everyday development process. It is created from the last working main branch to add a new feature or fix a bug. After all tests, it can be merged into the main branch.