Unit 1 - Introduction
Unit 1 - Introduction
Advantages:
Disadvantages:
- Single point of failure (if the central server goes down, users cannot access the
repository).
Advantages:
- Faster local operations since they don't require communication with a central
server.
Disadvantages:
- Potentially larger disk space requirements due to full repository copies on each
user's machine.
1. Repository: A storage location where all the project's files, history, and
metadata are stored.
Unit 1 - Introduction
3. Branch: A separate line of development that diverges from the main line
(usually called the "master" or "main" branch). Branches allow for the parallel
development of different features or bug fixes.
What is GIT?
Git is a widely used distributed version control system (DVCS) designed to track
changes in source code during software development. It was created by Linus
Torvalds in 2005 for managing the development of the Linux kernel, but it has
since become a standard tool in the software development industry for managing
version control and collaboration.
3. Fast and Efficient: Git is designed to be fast and efficient. Local operations,
such as committing changes, creating branches, and switching between
branches, are lightning-fast due to the distributed nature of the system.
can work on the same project simultaneously without interfering with each
other's work.
7. Staging Area: Git introduces the concept of a staging area (also known as
the index), where changes are prepared for a commit. This allows
developers to selectively choose which changes to include in the next
commit.
8. Open Source: Git is open-source software, meaning that its source code is
freely available for anyone to inspect, modify, and contribute to.
9. Large Ecosystem: Git has a vast and active community, resulting in a rich
ecosystem of tools, extensions, and integrations that enhance its
functionality and adapt it to various workflows.
Benefits of Git
A version control application allows us to keep track of all the changes that we
make in the files of our project. Every time we make changes in files of an existing
project, we can push those changes to a repository. Other developers are allowed
to pull your changes from the repository and continue to work with the updates
that you added to the project files.
o Saves Time
Git is lightning fast technology. Each command takes only a few seconds to
execute so we can save a lot of time as compared to login to a GitHub
account and find out its features.
o Offline Working
One of the most important benefits of Git is that it supports offline
working. If we are facing internet connectivity issues, it will not affect our
work. In Git, we can do almost everything locally. Comparatively, other CVS
like SVN is limited and prefer the connection with the central repository.
o Undo Mistakes
One additional benefit of Git is we can Undo mistakes. Sometimes the undo
can be a savior option for us. Git provides the undo option for almost
everything.
It consists of 4 parts:
1. Working directory: This is your local directory where you make the project
(write code) and make changes to it.
2. Staging Area (or index): this is an area where you first need to put your
project before committing. This is used for code review by other team
members.
3. Local Repository: this is your local repository where you commit changes to
the project before pushing them to the central repository on Github. This is
Unit 1 - Introduction
4. Central Repository: This is the main project on the central server, a copy of
which is with every team member as a local repository.
Git Vs GitHub
1. Git:
Git is a distributed version control system (DVCS) that helps you track
changes to your source code and manage different versions of your
project files.
2. GitHub:
GitHub offers features like pull requests, issue tracking, code reviews,
and project boards to streamline collaboration among developers.
Unit 1 - Introduction