0% found this document useful (0 votes)
40 views3 pages

Ajay Version Control

Git is a free, open-source distributed version control system created by Linus Torvalds in 2005, designed to track changes in code and facilitate collaboration among developers. Version control systems, like Git, allow users to manage changes over time, providing features such as history tracking, undo capability, and collaboration without conflicts. The Git workflow includes initializing a repository, tracking files, committing changes, viewing history, branching, merging, and pushing to remote repositories.

Uploaded by

ajaylap03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

Ajay Version Control

Git is a free, open-source distributed version control system created by Linus Torvalds in 2005, designed to track changes in code and facilitate collaboration among developers. Version control systems, like Git, allow users to manage changes over time, providing features such as history tracking, undo capability, and collaboration without conflicts. The Git workflow includes initializing a repository, tracking files, committing changes, viewing history, branching, merging, and pushing to remote repositories.

Uploaded by

ajaylap03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Version Control

What is Git?

Git is a free, open-source distributed version control system used to


track changes in code and collaborate with other developers.

It was created by Linus Torvalds (the creator of Linux) in 2005 to handle the
development of large projects with speed and efficiency.

Local and Remote:

• Local Git: Your personal copy of the code and its history on your
computer.

• Remote Git: A shared repository (like on GitHub, GitLab, or Bitbucket)


where teams sync their code.

What is Version Control?

Version control is a system that helps you track, manage, and control
changes to files over time — especially in code, documents, or any digital
content.

It’s like a “time machine” for your project, allowing you to:

• Save versions of your work

• Go back to previous versions if something breaks

• Collaborate with others without overwriting each other’s changes


Key Features of Version Control:

Feature Explanation

Keeps a full history of every change, who made it, and


History Tracking
when.

Allows you to roll back to a working version if


Undo Capability
something goes wrong.

Multiple people can work on the same project without


Collaboration
conflict.

Branching and Developers can work in isolated branches and later


Merging merge them together.

Provides a backup in case of accidental deletion or


Backup
corruption.

Types of Version Control Systems:


1. Local Version Control
o Tracks changes only on your computer
o Example: RCS (older)
2. Centralized Version Control (CVCS)
o One central server stores all versions
o Example: SVN, Perforce
3. Distributed Version Control (DVCS)
o Everyone has a full copy of the code and history
o Git is a DVCS — most widely used today
Git Version Control Workflow:
1. Initialize a Repository

git init

Starts version control in your project folder.

2. Track Files

git add filename

Stages files for commit (adds them to the next snapshot).

3. Save a Snapshot (Commit)

git commit -m "Your message"

Creates a versioned snapshot of your code.

4. View Change History

git log

Shows all past commits with details.

5. Create a Branch

git checkout -b feature-login

Creates a separate version of your code to work on a new feature.

6. Merge Branches

git merge feature-login

Combines changes from one branch into another.

7. Push to Remote Repository

git push origin main

Sends local commits to GitHub or another platform.

You might also like