Day 9 : Deep Dive in Git & GitHub for DevOps Engineers.

What is Git? why is it important?

Git is like a super-smart assistant for keeping track of changes in computer code. It's like a time machine that helps developers manage the different versions and track the history of their work. Introduced in 2005, Git has become the go-to tool for software developers.

Imagine you're working on a project with others. Git allows you to save different versions of your work, so if something goes wrong, you can easily go back to a previous, working version. It's like having a safety net for your code.

What is difference Between Main Branch and Master Branch?

The terms "main" branch and "master" branch in Git basically refer to the default branch in a repository where all the main work happens. In the past, "master" was the common term, but recently, many folks are using "main" to be more inclusive and avoid any potentially negative historical connotations associated with the word "master."

The difference between Git and GitHub?

GitGitHub
Git is a version control system.GitHub is a platform.
Operates locally on your computer.Operates in the cloud.
Keeps track of changes made to source code.Used for hosting Git repositories.
Manages the history of the project.Facilitates collaboration, sharing, and contribution.
Allows reverting to previous versions and facilitates collaboration.Provides a web-based interface.

Task 1 : Set your user name and email address, which will be associated with your commits.

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Replace "Your Name" with your actual name and "your.email@example.com" with your email address. The --global flag ensures that this configuration is applied globally across all your Git repositories.

Task 2 : Create a repository named "Devops" on GitHub

  • Connect your local repository to the repository on GitHub.

  • Create a new file in Devops/Git/Day-02.txt & add some content to it

  • Push your local commits to the repository on GitHub

0
Subscribe to my newsletter

Read articles from Yashraj Singh Sisodiya directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Yashraj Singh Sisodiya
Yashraj Singh Sisodiya

I am Yashraj Singh Sisodiya, a 3rd Year CSE student at SVVV, born and raised in Shujalpur. Currently residing in Indore, I'm passionate about pursuing a career in DevOps engineering. My tech journey began with an internship at Infobyte, honing my skills as an Android Developer intern. Alongside my academic pursuits, I actively participate in co-curriculars, holding roles as Technical Lead at Abhyudaya and Cloud Lead at GDSC SVVV, while also serving as an MLSA of my college. I have a keen interest in Cloud Computing, demonstrated through projects such as User management and Backup using shell scripting Linux, Dockerizing applications, CI/CD with Jenkins, and deploying a 3-tier application on AWS. Always eager to learn, I'm committed to expanding my knowledge and skills in the ever-evolving tech landscape.