# Day 8 : Basic Git & GitHub for DevOps Engineers.

### Git and GitHub: A Beginner's Guide to Repository Management 🖥️

### Introduction 🌟

Have you ever wanted to collaborate on a project with others, keep track of changes, and ensure your work is safe and sound? Well, Git and GitHub are here to help! 🚀 Let's break down the process of creating a new repository on GitHub, cloning it to your local machine, making changes, and pushing those changes back to GitHub, all with the help of emojis! 🤖

### **Step 1: Create a New Repository on GitHub 🏗️**

Imagine GitHub as your digital playground 🎮 where you build awesome projects. To start, let's create a new repository:

1. 🖥️ Log in to your GitHub account.
    
2. 👆 Click on the "+" sign in the top-right corner and select "New repository."
    
3. 📦 Give your repository a cool name and add a description if you want.
    
4. 🧩 Choose your repository's visibility (public or private).
    
5. 📂 Initialize the repository with a README file (it's like the welcome mat to your project).
    
6. 🔐 You can add a .gitignore file and a license if needed.
    
7. 🌟 Click the "Create repository" button, and voilà, you've created a new digital playground!
    

### **Step 2: Clone the Repository to Your Local Machine 🚗**

Now that you have a shiny new repository on GitHub, let's bring it to your computer:

1. 💻 Open your terminal or Git Bash if you're on Windows.
    
2. 📂 Navigate to the directory where you want to store your local copy of the repository.
    
3. 📋 Go back to your GitHub repository, click the "Code" button, and copy the repository's URL.
    
4. 🖱️ In your terminal, type `git clone <repository URL>` and press Enter.
    
5. 🚗 Git will magically download a copy of your repository to your local machine.
    

### **Step 3: Make Changes and Commit Them Using Git 📝**

Now comes the fun part – making changes to your project:

1. 📁 Open the project folder in your favorite code editor.
    
2. ✍️ Make the changes you want to the files inside the repository.
    
3. 📋 After making changes, go back to your terminal.
    
4. 📂 Navigate to your project's folder using the `cd` command.
    
5. 📸 Use `git status` to see which files have been modified.
    
6. ➕ Add the files you want to commit using `git add <file>` or `git add .` to add all changes.
    
7. 💬 Write a descriptive commit message using `git commit -m "Your message here"` to explain what you changed.
    

### **Step 4: Push the Changes Back to GitHub 🚀**

Time to share your awesome work with the world (or your collaborators):

1. 🚢 Push your changes to your GitHub repository using `git push origin main` (or `git push origin master` for older repositories).
    
2. 🔄 Your local changes will be sent to GitHub.
    
3. 🌐 Go to your GitHub repository in your web browser and refresh the page.
    
4. 🎉 You'll see your changes reflected in your online repository!
    

### Conclusion 🌈

And there you have it! You've successfully created a repository on GitHub, cloned it to your local machine, made changes, and pushed those changes back to GitHub. Git and GitHub are like your trusty sidekicks 🦸‍♂️, helping you manage and collaborate on projects seamlessly. Happy coding! 🚀👩‍💻👨‍💻
