🐱Day 8: Basic Git & GitHub for DevOps Engineers

Β·

2 min read

🐱Day 8: Basic Git & GitHub for DevOps Engineers

πŸ› οΈπŸ€”What is a Version Control System?

Version Control System addresses two major functions:

1. Sharing of code:🀝

Sharing code is essential for team collaboration, code testing, and code review.

2. Versioning:πŸ”„

Versioning is crucial for tracking the changes, enabling developers to revert to the previous version or state easily.

πŸŽ“Types of Version Control System:

1. Centralized version control system:🏒🎯

Centralized version control systems like SVN(SubVersioN) or CVS(Concurrent Versions System) operate with a single central server for collaboration.

2. Distributed Version Control System:🌐

Distributed version control systems like git enable developers to create multiple copies, reducing dependency on a single point of failure.

πŸ› οΈπŸ€”What is a Git and GitHub?

  • Git: Git is an open-source distributed version control system, that helps us to track changes in our code.

  • GitHub: GitHub is a platform built on top of Git, offering multiple features like code storage, code reviewing, issue tracking, and project management.

🏰Git and GitHub Examples:

Example #1:Create a new repository on GitHub.

Example #2:Clone the newly created repository to the local machine.

clone <-URL of Repository->

Example #3:Make some changes to the local file.

Example #4:Commit them to the repository using Git.

git add Local_file.txt
git commit -m "feat: added Local_file.txt"

Example #5:Push the changes back to the remote repository on GitHub.

git remote add origin https://<-tokenID->@github.com/<-User_Name->/<-Repo_Name->.git

git push -u origin main

Happy Coding :) πŸš€πŸ†

βœ… Feel free to reach out if you have any questions. I'm delighted to help! 😊

🀝 Let's Connect..!

πŸ”— LinkedIn

πŸ”— Twitter

πŸ”— GitHub

🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐🌐

Β