Day 9 - Deep Dive in Git & GitHub for DevOps Engineers.
Table of contents
- 💡What is Git and why is it important?
- 💡What is difference Between Main Branch and Master Branch?
- 💡Can you explain the difference between Git and GitHub?
- 💡How do you create a new repository on GitHub?
- 💡What is the difference between local & remote repositories? How to connect local to remote?
- 💥Task-1:
- 💥Task-2:
💡What is Git and why is it important?
Git is a distributed version control system (VCS) that helps developers track changes in their code and collaborate with others on software projects. It was created by Linus Torvalds in 2005 and has since become one of the most widely used version control systems in the software development industry.
It provides a robust and flexible version control system, enabling efficient collaboration, easy code management, and the ability to track changes over time.
💡What is difference Between Main Branch and Master Branch?
In essence, the difference between "main" and "master" is mainly in their names and the connotations they carry. Functionally, they both refer to the primary development branch in a Git repository
Master Branch: Historically, "master" was the default branch name in Git. It was used as the primary development branch where the main codebase resided.
Main Branch: The "main" branch serves the same purpose as the "master" branch – it's the default branch where the primary development work occurs. It's the starting point for new development, and other branches are often created from it.
💡Can you explain the difference between Git and GitHub?
Git is a distributed version control system (VCS) that is widely used for tracking changes in source code during software development.
GitHub is one of the most popular and widely used platforms for hosting and managing code repositories.
💡How do you create a new repository on GitHub?
💡What is the difference between local & remote repositories? How to connect local to remote?
local: a local repository is a copy of a project that is stored on your computer. You can make changes to the code in your local repository.
remote: a remote repository, on the other hand, is a version of your project that is stored on a server and is accessible from anywhere with an internet connection.
To connect a local repository to a remote repository, you need to use the “git remote” command
git remote add origin <remote_repository_url>
💥Task-1:
- Set your user name and email address, which will be associated with your commits.
git config --global user.email "youremail@example.com"
git config --global user.name "Your Name"
💥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
🎀Happy Learning:) 😊
Subscribe to my newsletter
Read articles from Sarika Kamble directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sarika Kamble
Sarika Kamble
👋 Hello, and welcome to my DevOps journey! 🚀 I'm Sarika Kamble, passionate about all things AWS DevOps Technology. Currently, on a learning adventure, I'm here to share my journey and Blogs in the world of cloud and DevOps. I'll be sharing my learnings, experiences, and adventures as I dive deep into the world of continuous integration, automation, and cloud technologies. ☁️⚙️ Let's connect, learn, and grow as a vibrant DevOps community. Follow my Hashnode blog, and let's embrace the DevOps adventure together! 🤝🔗 Follow me on LinkedIn: https://www.linkedin.com/in/sarika-kamble-3153b3218/