2 Answers

0 votes
by

I will suggest you attempt this question by first telling about the architecture of git as shown in the below diagram just try to explain the diagram by saying:

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

It is a distributed architecture that provides many advantages over other Version Control Systems (VCS) like SVN. One of the major advantages is that it does not rely on a central server to store all the versions of a project’s files.

Instead, every developer “clones” a copy of a repository I have shown in the diagram with “Local repository” and has the full history of the project available on his hard drive. So when there is a server outage all you need to do to recover is one of your teammate’s local Git repository.

There is a central cloud repository where developers can commit changes and share them with other teammates.GIT structure

0 votes
by

While centralized systems were the version control system of choice for nearly a decade, Git has surpassed them in recent years.

Unlike SVN, Git utilizes multiple repositories: a central repository and a series of local repositories. Local repositories are exact copies of the central repository complete with the entire history of changes.

The Git workflow is similar to SVN, but with an extra step: to create a new feature, you take an exact copy of the central repository to create your local repository on your local machine (you can think of this as your “local trunk”). Then you work on your local repository exactly as you would in SVN by creating new branches, tags, etc. When you’re done, you merge your branches into your local repository (i.e. local trunk). When you’re ready to merge into the central repository, you push your changes from your local repository to the central repository.

It’s faster to commit. Because you commit to the central repository more often in SVN, network traffic slows everyone down. Whereas with Git, you’re working mostly on your local repository and only committing to the central repository every so often.

No more single point of failure. With SVN, if the central repository goes down or some code breaks the build, no other developers can commit their code until the repository is fixed. With Git, each developer has their own repository, so it doesn’t matter if the central repository is broken. Developers can continue to commit code locally until the central repository has been fixed, and then they can push their changes.

It’s available offline. Unlike SVN, Git can work offline, allowing your team to continue working without losing features if they lose connection.

Teams also opt for Git because it’s open source and cross-platform. That means that support is available for all platforms, multiple sets of technologies, languages, and frameworks. And it’s supported by virtually all operating systems.

...