DevOps Classroomnotes 31/Jan/2023

Version Control Systems – Git an Introduction

  • Version control system is a software system that allows
    • developers to store the code in common location
    • retains history of every change
    • allows to work for multiple versios/releases/customers
      Preview
  • Generally Version Control System will have two software components
    • Client Software (Used by Developers of code)
    • Server Software (Used to host code/Administration)
  • Examples:

    • CVS
    • Visual Source Safe
    • Subversion
    • Perforce
    • Mercurial
    • IBM Clear Case
    • Team Foundation version control
    • Git
  • Evolution of version control systems

    • Single System
    • Single System => Multi User
    • Client Server
    • Distributed

Git

  • Git is a Distributed Version control system
  • Terms:

    • Commit: This is a changeset
    • Local Repository: This is the local code
    • Remote Repository: This is the central code
    • Working Directory: This is the folder/directory where we make changes
  • Git Workflow for now
    Preview
  • Git Cheatsheet Refer Here
  • Git can be connected with Server using two major ways
    • username and token/password
    • ssh key
  • Create a ssh-key
    • Launch Windows Powershell (Terminal)
    • Execute ssh-keygen
      Preview
  • Navigate to settings -> SSH and GPG keys and click on new ssh-key
    Preview
  • Copy the contents of ~\.ssh\id_rsa.pub and paste as shown below and add ssh key
    Preview
  • Now create a new repository
    Preview
    Preview
  • If you dont have a copy of remote repo i.e. local repo we perform an operation which is called as clone.
    Preview
  • Copy the url for clone
  • Navigate to any folder in your system and execute git clone <url>
    Preview
    Preview
  • Now lets make our first change and try executing the workflow
    Preview
    Preview
    Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner