Mastering Git & GitHub: A Deep Dive for DevOps Engineers

ยท

2 min read

Day 8 Tasks:

  1. What is Git and why is it important?

    • Git is a distributed version control system that enables developers to track changes, collaborate on code, and manage software development projects efficiently. It is important as it allows teams to work together seamlessly, roll back changes, and maintain a history of code revisions.
  2. What is Version Control? How many types of version controls do we have?

    • Version Control is a system that tracks changes made to files over time. There are two types of version control: centralized and distributed. Centralized version control stores code in a central server, while distributed version control allows each developer to have their own copy of the repository.
  3. What is the difference between Main Branch and Master Branch?

    • Main Branch and Master Branch are used interchangeably in Git, and they represent the primary branch of development. However, the term "Master" is being replaced with "Main" to remove any potentially offensive references.
  4. Can you explain the difference between Git and GitHub?

    • Git is the version control system that manages the tracking of changes, while GitHub is a web-based platform that provides hosting services for Git repositories, making collaboration and code sharing easier among developers.

Day 9 Tasks: Task 1:

  • To set your user name and email address in Git, use the following commands in your terminal:
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Task 2:

  • Create a repository named "Devops" on GitHub using the "+" button on the top-right corner of your GitHub account, and select "New Repository."

Task 3:

  • To connect your local repository to the GitHub repository, use the following commands in your terminal:
git remote add origin <GitHub_Repository_URL>
git branch -M main

Task 4:

  • Create a new file "Day-02.txt" inside the "Git" directory of your local repository and add some content using any text editor.

Task 5:

  • To push your local commits to the GitHub repository, use the following commands:
git add .
git commit -m "Added Day-02.txt"
git push -u origin main

Celebrate your progress and accomplishments on #90DaysOfDevOpsChallenge! ๐Ÿ’ป๐ŸŒ Keep learning and growing in the world of DevOps.

#DevOps #Git #VersionControl #GitHub #ContinuousLearning #SoftwareDevelopment #TechCommunity

ย