Devops Version Control Tool GIT Presented By Amrit
Devops Version Control Tool : GIT Presented By : Amrit Choudhary
GIT BASICS � DVCS : Distributed Version Control System Maintains a copy of full repository locally on each machine. � Merits: a) Super Fast b) Avoids runtime overhead as written in C. c) Implicit back : As multiple copies are maintained across the client machine, chances of losing data is rare. d) Secure : Every file is check-summed and retrieved via checksum at the time of checkout e) Easy & Quick branching : Takes few seconds to create, delete & merge branches
GIT : Terminology Local Repo : Copy of repository maintained by each user (Dev/Devops/other team members) Working area : It is where we download files/directories (workspace) Staging area : This is the area where code changes made, new files added needs to be staged so that we can commit to the repo later. Commit : It is the current state of the object/file. Also known as sha 1 sum. Branch : Main line of development. By default we have master branch. Tag : Tags are similar to branches but immutable , cannot commit in it. It is mainly created for product releases. Clone : Creates the instance of the repository. It is the mirror of the repository. Pull : Copies changes from remote repository instance to local(svn update) Push : Copies changes from local repository to remote one permanently. (svn commit) HEAD : Always points to latest commit(revision in svn / sha 1 sum in git) in the branch.
GIT : Environment Setup WINDOWS : Download exe from below link https: //git-scm. com/download/win LINUX : UBUNTU : $ sudo apt-get install git-core REDHAT : $ yum –y install git-core Verify installation WIN/LINUX git --version
Environment SETUP(customization) a) Add git to the environment variable for win & linux accordingly b) Must be an admin for executing setting up below default settings Setup default username: Setup default email : Setup color highlighting
Environment SETUP(customization) Setup default editor: Setup default Merge. Tool List all current git settings git config --list
GIT LIFECYCLE
- Slides: 7