Day 9 - 90DaysofDevops
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