Version Control system is
a software that helps software developers to work together and maintain a
complete history of their work.
Why do you need the
version Control System? So when we mess up things we can get back a previous
working version.
Following are the
some of the goals of the Version control System,
1) Allow developers
to work simultaneously
2) Allows not
over-writing each other changes
3) Maintain history
of every version of every thing
There are some of
the few terms that need to understand before moving in working with a version
Control System
Repository – A
Repository is the heart of the version control system. It is the central place
where developers store their work, in other words source code. The Repository
does not just store files but also history of what pushed into repository,
access history etc. The repository is located on a remote location where
developers access that using a client tool. Clients connect to the repository,
they perform operations like read, write , update etc. Once the files are
pushed to the repository, the files are available to all other clients who can
connect to the repository.
Trunk – A Trunk is
a directory where the main development happens and it is usually checked out by
developers to work on the project.
Tags – a Tag is
used to store snapshots of the project. Consider a developer working on a
separate request, makes the changes needs and creates a tag for that specific
change.
Branch – Branches
are used to create another line of development. Consider if a developer want to
work on other changes with out touching the main code ,he makes a branch of the
main code and does the changes to the branch code. This makes people not to
touch his code happening in Branch code. For example, when you release version
5.0, you might want to create a branch so that development of 6.0 features can
be kept separate from 5.0 bug-fixes.
Working Copy –
Working copy is the snap shot of the repository. The repository is accessed by
developers who have access to that. The developers then checkout ( pull ) the
code to their work space or work copy which is a local copy to the developer so
that he can work on his copy and push changes when done.
Check out- Pull
changes from the Repository. If new files are added, they will be pulled too.
Commit - Commit is
a process of storing changes from private workplace to central server. After
commit, changes are made available to all the team. Other developers can
retrieve these changes by updating their working copy. Commit is an atomic
operation. Either the whole commit succeeds or is rolled back. Users never see
half finished commit.
Merge (or patch): Apply the changes from one file to another, to bring
it up-to-date.
Revision: What version a file is on (v1, v2, v3, etc.).
Head: The latest revision in the repo.
So what does the
Version Control provides?
Backup/Restore: Files saved can be backed up or restored to a
specific moment in time. Need a File to be changed to a version last year , we
have that
Synchronization: Lets people share files and stay up-to-date with the
latest version
Track Changes – As details about the files
updated, merged, deleted will be available in the history maintained.
Branching and merging. A larger sandbox. You can branch a
copy of your code into a separate area and modify it in isolation (tracking
changes separately). Later, you can merge your work back into the
common area
Since we learned what a
version control system is and what is provides, we will move to the next level
of learning a SCM (Source Code management) tool. This article will explain the
basics of Git and its working
More to Come J
No comments :
Post a Comment