SlideShare a Scribd company logo
1 of 25
DSA05
Day - 1
@2020 copyright KalKey training
VERSION
CONTROL
• Version control is a system that records changes to a file or set
of files over time so that you can recall specific versions later.
• If you are a graphic or web designer and want to keep every
version of an image or layout then it allows you to revert files
back to previous state revert the entire project back to
previous state, compare changes over time, see who last
modified something that might be causing a problem , who
introduce an issue and when, and more.
@2020 copyright KalKey training
Why Is Version
Control So
Important?
Keeping track of changes.
Ability to go back to a
previous working version.
Easily add someone else’s
work.
@2020 copyright KalKey training
TYPES OF VERSION CONTROL SYSTEM
Centralized
Version
Control System
Distributed
Version
Control System
@2020 copyright KalKey training
VCS
• Centralized Version control system
• Centralized version control means that the version history is stored in a central
server. When a developer wants to make changes to certain files, they pull files from
that central server to their own computer. After the developer has made changes,
they send the changed files back to the central server.
• Distributed Version control system
• Distributed VCS, everyone has a local copy of the entire work’s history This
means that it is not necessary to be online to change revisions or add changes to the
work.
• “Distributed” comes from the fact that there isn’t a central entity in charge of
the work’s history, so that anyone can sync with any other team member. This helps
avoid failure due to crash of the central versioning server.
@2020 copyright KalKey training
@2020 copyright KalKey training
@2020 copyright KalKey training
SVN
• SVN is a centralized version control system. ... Centralized version control means that the version history is
stored in a central server. When a developer wants to make changes to certain files, they pull files from
that central server to their own computer
@2020 copyright KalKey training
INTRODUCTION TO GIT
• Git is a distributed version-control system for tracking changes in source
code during software development.
• It is designed for coordinating work among programmers, but it can be
used to track changes in any set of files.
• Its goals include speed, data integrity and support for distributed, non-
linear workflows.
• Git is free and open-source software distributed under the terms of
the GNU General Public Licensee version 2.
@2020 copyright KalKey training
Installation Git on Windows
1. Download the git software from the following link.
https://git-scm.com/downloads
2. Now open the software, click next, and customize your
installation and finish it.
3. Check the git version from command prompt on your
system by executing the following command.
git --version // or you can type the same command by
opening git bash
4. Execute the below command for creating an empty Git
repository or reinitialize an existing one.
git init
@2020 copyright KalKey training
Installation Git on Linux
1. Install the git package by running the below command.
yum install git -y
3. Check the git version by executing the below command
from your linux instance.
git --version
4. Execute the below command for creating an empty Git
repository or reinitialize an existing one.
git init
5. Configure your Git username and email using the following
commands.
git config --global user.name “John”
git config --global user.email john.18@example.com
git config --list
@2020 copyright KalKey training
GIT - LIFE CYCLE
1
Clone the git
repository as a
working copy.
2
Modify the working
copy by adding/editing
files.
3
If necessary, also
update the working
copy by taking other
developer's changes.
4
Review the changes
before commit.
5
Commit changes. If
everything is fine, then
push the changes to
the repository.
6
After committing, if
something is wrong,
then correct the last
commit and push the
changes to the
repository.
@2020 copyright KalKey training
@2020 copyright KalKey training
GITHUB
• GitHub is a code hosting platform for collaboration and version control.
• GitHub lets you (and others) work together on projects.
• GitHub essentials are:
Repositories
Branches
Commits
Pull Requests
Git (the version control software GitHub is built on)
@2020 copyright KalKey training
Repository
• A GitHub repository can be used to store a development project.
• It can contain folders and any type of files (HTML, CSS, JavaScript, Documents, Data, Images).
• A GitHub repository should also include a license file and a README file about the project.
• A GitHub repository can also be used to store ideas, or any resources that you want to share.
@2020 copyright KalKey training
Branch
• A GitHub branch is used to work with different versions of a repository at the same time.
• By default a repository has a master branch (a production branch).
• Any other branch is a copy of the master branch (as it was at a point in time).
• New Branches are for bug fixes and feature work separate from the master branch. When changes are
ready, they can be merged into the master branch. If you make changes to the master branch while
working on a new branch, these updates can be pulled in.
Commits
• At GitHub, changes are called commits.
• Each commit (change) has a description explaining why a change was made.
@2020 copyright KalKey training
Pull Requests
• Pull Requests are the heart of GitHub collaboration.
• With a pull request you are proposing that your changes should be merged (pulled in) with the master.
@2020 copyright KalKey training
Open an account in GitHub
@2020 copyright KalKey training
To create a new repository
1. In the upper right corner, next to your avatar or identicon, click + and then select new
repository.
2. Name your repository hello-world1.
3. Write a short description.
4. Select Initialize this repository with a README.
@2020 copyright KalKey training
@2020 copyright KalKey training
To create a new branch
1. Go to your new repository hello-world.
2. Click the drop down at the top of the file list that says branch: master.
3. Type a branch name, INB-1, into the new branch text box.
4. Select the blue Create branch box or hit “Enter” on your keyboard.
@2020 copyright KalKey training
@2020 copyright KalKey training
Make and commit changes
• Click the readme.md file.
• Click the pencil icon in the upper right corner of the file view to edit.
• In the editor, write a bit about yourself.
• Write a commit message that describes your changes.
• Click Commit changes button.
• These changes will be made to just the README file on your INB-1 branch, so now this branch contains content that’s different from master.
@2020 copyright KalKey training
Open a Pull Request
• Nice edits! Now that you have changes in a branch off of master, you can open a pull request.
• Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and
requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs,
or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red.
• As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished.
• You can even open pull requests in your own repository and merge them yourself. It’s a great way to learn the GitHub
flow before working on larger projects.
• Open a Pull Request for changes to the README
• When you’re done with your message, click Create pull request!
@2020 copyright KalKey training
Merge your Pull Request
In this final step, it’s time to bring your changes together – merging your INB-1 branch into the
master branch.
1. Click the green Merge pull request button to merge the changes into master.
2. Click Confirm merge.
3. Go ahead and delete the branch, since its changes have been incorporated, with the Delete
branch button in the purple box.
@2020 copyright KalKey training

More Related Content

What's hot

Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucketMedhat Dawoud
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_finalMythri P K
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucketSumin Byeon
 
Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHubMichael Redlich
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
Branch to branch by Photis Patriotis
Branch to branch by Photis PatriotisBranch to branch by Photis Patriotis
Branch to branch by Photis PatriotisProlific Interactive
 
Git & GitHub
Git & GitHubGit & GitHub
Git & GitHubCuong Ngo
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHubDSCVSSUT
 
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketDifference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketAcodez IT Solutions
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administrationShawn Doyle
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOpsAhmad Iqbal Ali
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubGDSCIIITBbsr
 
Migrating to git
Migrating to gitMigrating to git
Migrating to gitXpand IT
 
Git Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and TagsGit Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and TagsMikhail Melnik
 

What's hot (20)

BitBucket presentation
BitBucket presentationBitBucket presentation
BitBucket presentation
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 
Bitbucket
BitbucketBitbucket
Bitbucket
 
Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
 
Git presentation
Git presentationGit presentation
Git presentation
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
GitHub
GitHubGitHub
GitHub
 
Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHub
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git theory
Git   theoryGit   theory
Git theory
 
Branch to branch by Photis Patriotis
Branch to branch by Photis PatriotisBranch to branch by Photis Patriotis
Branch to branch by Photis Patriotis
 
Git & GitHub
Git & GitHubGit & GitHub
Git & GitHub
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketDifference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucket
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administration
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOps
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHub
 
Migrating to git
Migrating to gitMigrating to git
Migrating to git
 
Git Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and TagsGit Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and Tags
 

Similar to Version control git day01

02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)Mohammed Shaban
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02Gourav Varma
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshareRakesh Sukumar
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptxEshaan35
 
Version control with git
Version control with gitVersion control with git
Version control with gitPurav Gandhi
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with GitIvano Malavolta
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfbadrfathallah2
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfAmarnadh36
 
Get your Git on GitHub
Get your Git on GitHubGet your Git on GitHub
Get your Git on GitHubRuncy Oommen
 

Similar to Version control git day01 (20)

02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 
Get Git with It! A Developer's Workshop.pptx
Get Git with It! A Developer's Workshop.pptxGet Git with It! A Developer's Workshop.pptx
Get Git with It! A Developer's Workshop.pptx
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
Github
GithubGithub
Github
 
Version control with git
Version control with gitVersion control with git
Version control with git
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Git
GitGit
Git
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Version control
Version controlVersion control
Version control
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
Advance workshop on git
Advance workshop on gitAdvance workshop on git
Advance workshop on git
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
Git tech
Git techGit tech
Git tech
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git 101
Git 101Git 101
Git 101
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
Get your Git on GitHub
Get your Git on GitHubGet your Git on GitHub
Get your Git on GitHub
 

More from Gourav Varma

More from Gourav Varma (20)

Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Aws day 4
Aws day 4Aws day 4
Aws day 4
 
Aws day 3
Aws day 3Aws day 3
Aws day 3
 
Aws day 2
Aws day 2Aws day 2
Aws day 2
 
Ansible day 4
Ansible day 4Ansible day 4
Ansible day 4
 
Ansible day 3
Ansible day 3Ansible day 3
Ansible day 3
 
Adnible day 2.ppt
Adnible day   2.pptAdnible day   2.ppt
Adnible day 2.ppt
 
Ansible day 1.ppt
Ansible day 1.pptAnsible day 1.ppt
Ansible day 1.ppt
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01
 
Dev ops
Dev opsDev ops
Dev ops
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Final terraform
Final terraformFinal terraform
Final terraform
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Docker advance topic (2)
Docker advance topic (2)Docker advance topic (2)
Docker advance topic (2)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Introduction of devops
Introduction of devopsIntroduction of devops
Introduction of devops
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Version control git day01

  • 1. DSA05 Day - 1 @2020 copyright KalKey training
  • 2. VERSION CONTROL • Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. • If you are a graphic or web designer and want to keep every version of an image or layout then it allows you to revert files back to previous state revert the entire project back to previous state, compare changes over time, see who last modified something that might be causing a problem , who introduce an issue and when, and more. @2020 copyright KalKey training
  • 3. Why Is Version Control So Important? Keeping track of changes. Ability to go back to a previous working version. Easily add someone else’s work. @2020 copyright KalKey training
  • 4. TYPES OF VERSION CONTROL SYSTEM Centralized Version Control System Distributed Version Control System @2020 copyright KalKey training
  • 5. VCS • Centralized Version control system • Centralized version control means that the version history is stored in a central server. When a developer wants to make changes to certain files, they pull files from that central server to their own computer. After the developer has made changes, they send the changed files back to the central server. • Distributed Version control system • Distributed VCS, everyone has a local copy of the entire work’s history This means that it is not necessary to be online to change revisions or add changes to the work. • “Distributed” comes from the fact that there isn’t a central entity in charge of the work’s history, so that anyone can sync with any other team member. This helps avoid failure due to crash of the central versioning server. @2020 copyright KalKey training
  • 8. SVN • SVN is a centralized version control system. ... Centralized version control means that the version history is stored in a central server. When a developer wants to make changes to certain files, they pull files from that central server to their own computer @2020 copyright KalKey training
  • 9. INTRODUCTION TO GIT • Git is a distributed version-control system for tracking changes in source code during software development. • It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. • Its goals include speed, data integrity and support for distributed, non- linear workflows. • Git is free and open-source software distributed under the terms of the GNU General Public Licensee version 2. @2020 copyright KalKey training
  • 10. Installation Git on Windows 1. Download the git software from the following link. https://git-scm.com/downloads 2. Now open the software, click next, and customize your installation and finish it. 3. Check the git version from command prompt on your system by executing the following command. git --version // or you can type the same command by opening git bash 4. Execute the below command for creating an empty Git repository or reinitialize an existing one. git init @2020 copyright KalKey training
  • 11. Installation Git on Linux 1. Install the git package by running the below command. yum install git -y 3. Check the git version by executing the below command from your linux instance. git --version 4. Execute the below command for creating an empty Git repository or reinitialize an existing one. git init 5. Configure your Git username and email using the following commands. git config --global user.name “John” git config --global user.email john.18@example.com git config --list @2020 copyright KalKey training
  • 12. GIT - LIFE CYCLE 1 Clone the git repository as a working copy. 2 Modify the working copy by adding/editing files. 3 If necessary, also update the working copy by taking other developer's changes. 4 Review the changes before commit. 5 Commit changes. If everything is fine, then push the changes to the repository. 6 After committing, if something is wrong, then correct the last commit and push the changes to the repository. @2020 copyright KalKey training
  • 14. GITHUB • GitHub is a code hosting platform for collaboration and version control. • GitHub lets you (and others) work together on projects. • GitHub essentials are: Repositories Branches Commits Pull Requests Git (the version control software GitHub is built on) @2020 copyright KalKey training
  • 15. Repository • A GitHub repository can be used to store a development project. • It can contain folders and any type of files (HTML, CSS, JavaScript, Documents, Data, Images). • A GitHub repository should also include a license file and a README file about the project. • A GitHub repository can also be used to store ideas, or any resources that you want to share. @2020 copyright KalKey training
  • 16. Branch • A GitHub branch is used to work with different versions of a repository at the same time. • By default a repository has a master branch (a production branch). • Any other branch is a copy of the master branch (as it was at a point in time). • New Branches are for bug fixes and feature work separate from the master branch. When changes are ready, they can be merged into the master branch. If you make changes to the master branch while working on a new branch, these updates can be pulled in. Commits • At GitHub, changes are called commits. • Each commit (change) has a description explaining why a change was made. @2020 copyright KalKey training
  • 17. Pull Requests • Pull Requests are the heart of GitHub collaboration. • With a pull request you are proposing that your changes should be merged (pulled in) with the master. @2020 copyright KalKey training
  • 18. Open an account in GitHub @2020 copyright KalKey training
  • 19. To create a new repository 1. In the upper right corner, next to your avatar or identicon, click + and then select new repository. 2. Name your repository hello-world1. 3. Write a short description. 4. Select Initialize this repository with a README. @2020 copyright KalKey training
  • 21. To create a new branch 1. Go to your new repository hello-world. 2. Click the drop down at the top of the file list that says branch: master. 3. Type a branch name, INB-1, into the new branch text box. 4. Select the blue Create branch box or hit “Enter” on your keyboard. @2020 copyright KalKey training
  • 23. Make and commit changes • Click the readme.md file. • Click the pencil icon in the upper right corner of the file view to edit. • In the editor, write a bit about yourself. • Write a commit message that describes your changes. • Click Commit changes button. • These changes will be made to just the README file on your INB-1 branch, so now this branch contains content that’s different from master. @2020 copyright KalKey training
  • 24. Open a Pull Request • Nice edits! Now that you have changes in a branch off of master, you can open a pull request. • Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red. • As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished. • You can even open pull requests in your own repository and merge them yourself. It’s a great way to learn the GitHub flow before working on larger projects. • Open a Pull Request for changes to the README • When you’re done with your message, click Create pull request! @2020 copyright KalKey training
  • 25. Merge your Pull Request In this final step, it’s time to bring your changes together – merging your INB-1 branch into the master branch. 1. Click the green Merge pull request button to merge the changes into master. 2. Click Confirm merge. 3. Go ahead and delete the branch, since its changes have been incorporated, with the Delete branch button in the purple box. @2020 copyright KalKey training