In a Devops lifecycle Initial step was the plan, once the planning process is completed move to the next process, The second process is ca...
In a Devops lifecycle Initial step was the plan, once the planning process is completed move to the next process, The second process is called “code”.
we create a code to build an application. Some of the tools used to build an application in a Devops life cycle. Git is one of the most used tools in the devops life cycle to create the code.
What is Git?
Git was created by Linus Torvalds, and initially released on 7th April 2005.
Git is a software, command-line tool, maintained by Linux, it was open-source.
Git is a version control system, It is used to track the changes of the files, Git has a history of change records, so can easily identify the changes.
Git also makes collaboration easier, allowing changes by multiple people to all to be merged into one source.
Git enables the communication between the development and the operations team.
Git was available for the following os Linux, macOS, Solaris, AIX, Windows
It was a version control system, so developers allow work simultaneously.
It is distributed so that connectivity doesn’t block work,
Git is team-centric so collaboration comes naturally.
Advantages of Git:
1. Free and open source
2. Small and Fast
3. Branching easy
4. Secure
5. History Tracking
What is Github?
Github was initially launched on April 10, 2008, by Tom Preston-Werner, Chris Wanstrath, P. J. Hyett, and Scott Chacon.
Github is a provider of internet hosting for software development and version control using git.
It provides distributed version control, SCM(source code management) functionality of git, access control, bug tracking, task management, and continuous integration.
In Devops GitHub plays a major role to store the code in the cloud.
What is repositories?
In Github, a repository contains all of your project's files and each file's revision history. You can discuss and manage your project's work within the repository.
In a Devops your repository is used to integrate with your Jenkins projects.
Installation of Git:
Git can use in Windows, Mac, and Linux operating systems.
For windows download the git from the official git website.
macOS: There are several options for installing Git on macOS. Homebrew Install homebrew if you don't already have it, then: Command: $ brew install git If you would like to install git-gui and gitk, git's commit GUI and interactive history browser, you can do so using homebrew Command: $ brew install git-gui
Linux:
It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.31.0.
Debian/Ubuntu
For the latest stable version for your release of Debian/Ubuntu
command: apt-get install git
Fedora
Command: yum install git (up to Fedora 21)
Command: dnf install git (Fedora 22 and later)
Gentoo
Command emerge --ask --verbose dev-vcs/git
Arch Linux
Command: pacman -S git
openSUSE
Command: zypper install git
Mageia
Command: urpmi git
Nix/NixOS
Command: nix-env -i git
FreeBSD
Command: pkg install git
Solaris 9/10/11 (OpenCSW)
Command: pkgutil -i git
Solaris 11 Express
Command: pkg install developer/versioning/git
OpenBSD
Command: pkg_add git
Alpine
Command: apk add git
Command: git --version
Git is mainly a commands-based tool, so git has some of the commands to execute the operations. In the next blog, we have covered Git commands.