Day 9 - 90DaysofDevops

BIPUL KUMARBIPUL KUMAR
2 min read

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

What is Git and why is it important?

Git is a distributed version control system (DVCS) designed to help developers collaborate on projects efficiently.

  • Git provides version control, enabling developers to manage and review changes over time.

  • Git's distributed architecture ensures that every developer possesses a complete copy of the project's history.

  • Git offers powerful branching and merging capabilities.

  • Git simplifies collaboration and teamwork.

  • Git ensures code integrity and provides backup options.

  • Git benefits from a vast open-source community.

What is the difference Between Main Branch and Master Branch?

There is no such difference from a technical standpoint.

The difference between the "main" and "master" branches is primarily in their naming conventions. "Master" was the traditional default branch name in Git, but many organizations and communities have switched to using "main" or other alternatives to promote inclusivity.

Can you explain the difference between Git and GitHub?

Git is a distributed version control system, while GitHub is a web-based platform that hosts Git repositories and facilitates collaboration.

How do you create a new repository on GitHub?

TO create a new repository on GitHub

Create a Github account :-

After Login to your GitHub account, Goto the right side, click +, and click create a new repository.

What is the difference between local & remote repository? How to connect local to remote?

Local repositories are the one that are from your local computer whereas the remote repositories are from remote machines like servers where all the data is stored and provided to the team.

Create a Repo in the GitHub and use the git commands

git init

git add .

git status

git commit -m "comments any"

git branch -M main

git remote add origin "url of the newly created repo"

git push -u origin main

Task:-1

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

Task:-2

Create a repository named "Devops" on GitHub

Connect your local repository to the repository on GitHub.

Create a new file in Devops & add some content to it

Push your local commits to the repository on GitHub

0
Subscribe to my newsletter

Read articles from BIPUL KUMAR directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

BIPUL KUMAR
BIPUL KUMAR