DEVOPS DAY 2

 What we’ll cover?

Git intro & Installation
Git Introduction
Git Installation on Linux
Download & Install Git on Windows
Key Git Terminology
Git installation doubt clear (Student machine)
Git Quick Start
Configure User Information in Git
Create First Git Repository (Local Workspace)
First Git Commit
Adding Files and GIT Logs
Understanding of Git Workflow
Q&A

What is Git?

Git is an Open-Source Distributed Version Control System. It is designed for
Speed
Simplicity
Fully Distributed
Excellent support for parallel development, support for hundreds of parallel branches.
Integrity
History of Git
Git was developed by Linus Torvalds, creator of Linux Operating System. Git was developed when the relationship between the existing Version Control System (BitKeeper) and Linux team broke.


Installation

GIT is open source and can be installed on all major OS.
Windows
Mac
Linux

 

Stages in Git Life Cycle

Files in a Git project have various stages like Creation, Modification, Refactoring, and Deletion and so on. Irrespective of whether this project is tracked by Git or not, these phases are still prevalent. However, when a project is under Git version control system, they are present in three major Git states in addition to these basic ones. Here are the three Git states:
Working directory
Staging area
Git directory
GIT Repository contains Files, History, Config Managed by GIT.



Working Directory

Consider a project residing in your local system. This project may or may not be tracked by Git. In either case, this project directory is called your Working directory.
Working directory is the directory containing hidden .git folder.

Note: git init - Command to initialize a Git repository


Staging Area

staging area is the playground where you group, add and organize the files to be committed to Git for tracking their versions.
Indexing is the process of adding files to the staging area. In other words, index constitutes of files added to the staging area.

Note: git add - Command to add files to staging area.

Git Directory

Now that the files to be committed are grouped and ready in the staging area, we can commit these files. So, we commit this group of files along with a commit message explaining what is the commit about. Apart from commit message, this step also records the author and time of the commit. Now, a snapshot of the files in the commit is recorded by Git. The information related to this commit (names of files committed, date and time of commit, author of commit, commit message) is stored in the Git directory.
Note: git commit -m "your message" - Command to commit files to Git repository with message.



Assignment:

 Install Git
 Configure User information in Git
 Create a Project in local system
 Create a file called “First_File.txt” (Add some content in to the file)
 Add the file to Git
 Commit the file to Git local repository






Comments

Popular posts from this blog

DEVOPS DAY 5

DEVOPS DAY 4