What is Git and GitHub for DevOps?

What is Git and GitHub for DevOps?

Day 9 of 90daysofdevops

·

3 min read

Hello Readers,

Here we are Day 9 of #90daysofdevops

👣 Topics for #day9

  • What is Git and GitHub for DevOps?

  • Scenerio based approach on same.

  • Tasks of Day 9


What is Git and GitHub for DevOps?

Git is a distributed version control system that allows developers to track changes to their code over time, collaborate with other developers, and manage multiple versions of their codebase.

GitHub is a web-based platform for hosting and collaborating on Git repositories. It provides a number of features that make it easier for developers to collaborate on code, including pull requests, issues, and code reviews.

As a DevOps engineer, you may use Git and GitHub to manage code repositories, track changes to your infrastructure as code, and collaborate with other members of your team.

Git and GitHub can be used to automate the deployment of code changes to your infrastructure, enabling you to quickly and easily deploy updates to your applications and services. Additionally, Git and GitHub can be used to store and manage configuration files and other resources that are needed for your infrastructure.


Let us understand this with a scenerio:

  • Let's say you're working on a web application with a team of developers, and you're responsible for managing the deployment of updates to the application. You've set up an automated deployment pipeline that builds and deploys the application to your servers whenever changes are made to the code.

  • To manage the codebase, you use Git and GitHub. Each developer on your team has their own branch in the Git repository where they make changes to the code. When they're ready to merge their changes into the main codebase, they create a pull request on GitHub.

  • As the DevOps engineer, you review the pull request and ensure that the changes won't cause any issues with the deployment pipeline. You might also use tools like automated testing and code analysis to check the quality of the code.

  • Once you're satisfied that the changes are safe to merge, you approve the pull request and the changes are merged into the main branch. This triggers your automated deployment pipeline, which builds and deploys the updated application to your servers.

  • If any issues arise during the deployment, you can use Git and GitHub to roll back the changes to the previous version of the code. This ensures that your application stays stable and available for your users.

Overall, using Git and GitHub enables you and your team to work collaboratively on the codebase, while also providing a reliable and efficient way to manage deployments and rollbacks.


Tasks of Day 9

  1. Displaying user.name and user.email

  2. GitHub Repository

  3. Local Repositiory

    Before Push:

    After Push:

    This proves that the Local repo is connected with GitHub

  4. From CLI

    From GitHub

Before Push:

After Push:


Thank you for reading my Blog. I hope you have learnt something from it! If you find this blog helpful, please like, share, and follow me for more interesting posts like this in the future.

Pavan Kumar R

Please navigate to my GitHub Repo: GitHub Repo Link

to check my solutions for the tasks of 90daysofdevops Challenge.

LinkedIn Link

Â