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
- 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
- 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
- Navigate to settings -> SSH and GPG keys and click on new ssh-key
- Copy the contents of
~\.ssh\id_rsa.pub
and paste as shown below and add ssh key
-
Now create a new repository
-
If you dont have a copy of remote repo i.e. local repo we perform an operation which is called as clone.
- Copy the url for clone
-
Navigate to any folder in your system and execute
git clone <url>
-
Now lets make our first change and try executing the workflow