Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views25 pages

Lesson 2 - Version Control System Using Git

The document provides an overview of Version Control Systems (VCS), focusing on Git, a distributed version control system designed for collaboration and efficiency in software development. It outlines the benefits of using Git, the Git workflow, essential commands, and the concept of branching for managing different development tasks. Additionally, it includes an activity for creating a C# program and demonstrating various Git commands.

Uploaded by

videosavingaaron
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)
11 views25 pages

Lesson 2 - Version Control System Using Git

The document provides an overview of Version Control Systems (VCS), focusing on Git, a distributed version control system designed for collaboration and efficiency in software development. It outlines the benefits of using Git, the Git workflow, essential commands, and the concept of branching for managing different development tasks. Additionally, it includes an activity for creating a C# program and demonstrating various Git commands.

Uploaded by

videosavingaaron
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/ 25

Version Control

System using Git


APPLICATIONS DEVELOPMENT AND
EMERGING TECHNOLOGIES

PREPARED BY:
YUZEF EZECKIEL D. ESPARRAGO
Introduction to VCS
VCS or Version Control System helps track
changes in files over time. It enables
collaboration among multiple developers and
provides a history of changes for auditing and
rollback.
Types of VCS
Local Version Control: Simple tracking of
changes on a local machine.
Centralized Version Control (CVCS): A
single central server stores all versions
(e.g., SVN, Perforce).
Distributed Version Control (DVCS): Every
user has a full copy of the repository (e.g.,
Git, Mercurial).
What is Git?
Git is a distributed version control system
developed by Linus Torvalds in 2005. It is
designed for speed, efficiency, and
collaboration.

It is typically used in software development,


DevOps, and project management.
Benefits of using Git
Distributed architecture for redundancy.
Branching and merging for parallel
development.
Fast performance and efficient data
storage.
Secure with cryptographic integrity.
Integrates with Continuous Integration/
Continuous Operation (CI/CD) pipelines.
Git Workflow
Working Directory: Files being edited.
Staging Area: Files prepared for commit.
Repository: Commits are stored in history.
Remote Repository: Shared repository
(e.g., GitHub, GitLab, Bitbucket).
Working with Git
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Creating a Git Repository
1. Create a new project on Visual Studio.
2. Go to Git > Create Git Repository
3. Click on Account > Sign In with your GitHub
Credentials.
Git Commands

Commit
Saves changes from the staging area to
the repository.
Creates a checkpoint that can be reverted
if needed.
All changes are saved locally.
Before committing, a message is required.
Git Commands

Push
Uploads local commits to a remote
repository.
Ensures others can access your changes.
Git Commands

Pull
Fetches and integrates changes from a
remote repository.
Merges them into the local branch.
Git Commands
Fetch
Downloads updates from the remote repository but does not merge them.
Allows manual review before merging changes.
Git Commands

View Branch History


Displays commit history in a structured
format.
Helps visualize branch merges and
changes.
Git Commands

Revert
Creates a new commit that undoes
changes from a previous commit.
Preserves history and does not remove
commits.
Git Commands

Reset
Reverts the changes locally.
Keep Changes - latest commit will
disappear, changes remain.
Delete Changes - commit will disappear,
changes will be erased.
What is a Git Branch?
A branch is an independent line of
development that allows multiple
developers to work on different features
simultaneously.
The default branch in Git is main or master.
Branches provide a way to isolate features,
bug fixes, or experiments before merging
them into the main codebase.
What is a Git Branch?
Feature Branching: Each new feature is
developed in a separate branch and
merged when completed.
Git Flow: Uses dedicated branches for
development, releases, and hotfixes.
Trunk-Based Development: Developers
work in short-lived branches and
frequently merge changes.
Cloning a Repository
Cloning creates a copy of a remote repository
on your local machine.
It enables developers to work on the project
independently while staying connected to the
remote repository.

Features:

Preserves commit history.


Sets up a remote connection (origin) by
default.
Useful for contributing to open-source
projects or team collaboration.
Activity No. 1
Create a simple C# program demonstrating C#
functions.

Then, create a Git repository and create some


modifications demonstrating the following Git
commands:

Commit
Push
Pull
Revert

Create a separate branch for your working


application with different blocks of code.

Submit the link of your GitHub repository on MS


Forms that will be created.

You might also like