# 📝 Title: Basic Git & GitHub for DevOps Engineers.  💻🐙

### 🔧 What is Git? 🔧

Git is a version control system 🔄 that lets you track changes to files 📝 and coordinate work among multiple people 👥. It's like a time machine ⏳ for your code! With Git, you can easily revert to earlier versions 🕰️, see who made changes 🧑‍💻, and collaborate with ease 🤝.

### 🐙 What is GitHub? 🐙

GitHub 🌐 is a web-based platform that provides hosting for Git repositories 🗄️. It's like a social network for developers 👩‍💻👨‍💻, where they can share and collaborate on projects 🚀. GitHub makes it simple to work together on code 💻 and manage open-source projects 🌟.

### 🔍 What is Version Control? 🔍

Version control is like a superhero 🦸 for your code! It tracks changes 📈 to your files over time, letting you go back in time ⏰ and undo mistakes 🙅‍♂️. It's like having a safety net 🕸️ for your development process!

### 🔄 Distributed vs. Centralized Version Control 🔄

Centralized version control 🏢 has a central server where everyone connects, like a single hub. Distributed version control 🌐 gives each developer their own copy of the entire project 🎉. It's like everyone having their personal superpowers 💥, making collaboration more efficient 🚀, and enabling offline work 🚫🌐.

So, we choose distributed version control 🌟🌟 because it empowers us to work better together 🤝, be faster ⚡, and more flexible 💪. It keeps our code safe 🛡️ and resilient 💡, making our coding journey smoother 🏄‍♂️🏄‍♀️!

GitHub is a web-based platform that provides hosting for version control using Git. It is a subsidiary of Microsoft, and it offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its features. GitHub is a very popular platform for developers to share and collaborate on projects, and it is also used for hosting open-source projects.

### **Exercise 1: Create and Clone Your Repository** 🗃️

Step 1: 🌟 Go to GitHub and create a new repository. Give it a catchy name, like "devops-batch-4"! 🔥

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690923741300/6f5aca7d-711c-4ced-aad3-c5c8c9d613c8.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690923774884/e306d8a7-717e-4495-b262-e2836fbc7c79.png align="center")

Step 2: 🏴‍☠️ On your local machine, open the terminal and navigate to your desired directory using `cd`.

Step 3: 🚀 Clone your newly minted repository to your local machine using `git clone <repository_url>`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690923795014/8cd3e7ba-b1d2-41cb-b9f5-33533fbe012a.png align="center")

**Exercise 2: Make Changes and Commit Them** 📝

Step 1: 🖊️ Open the cloned repository in your favorite code editor and create a new file, "practice.txt". Add some exciting code to it! 💻

Step 2: 🎨 Save the changes, and back in the terminal, use `git status` to see the modified files.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690923838980/574c7c53-5c5b-4f70-be22-4123f4bcc752.png align="left")

Step 3: 📸 Add the changes to the staging area with `git add .`.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690923903048/31ba8701-f4db-42d8-8384-6c874244b341.png align="left")

Step 4: 🎉 Commit your changes with a descriptive message using `git commit -m "Added an amazing super feature!"`.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690923958736/26f50290-3b46-415b-b21a-79496ecb0737.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690924033980/29ec0079-2cee-4cfc-b9e4-05d43620f854.png align="left")

**Exercise 3: Push Changes to GitHub** 🚀

Step 1: 📤 It's showtime! Push your committed changes to GitHub with `git push origin master`. 🐙

Step 2: 🕵️‍♂️ Go to your GitHub repository and witness the magic! Your "super\_feature.py" file is now on the cloud! ☁️

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690924055039/711762f4-34be-40db-9a6d-75e8b05e5bfa.png align="left")

Congratulations! 🎉🎉 You're now a Git champion, fearlessly versioning your code and collaborating like a pro! 🤝 Embrace the power of Git and GitHub, and watch your development journey soar to new heights! 🌈 Happy coding! 💻🚀
