When I started learning DevOps, one tool kept coming up everywhere Git. I realized that if you want to work on real projects or with other developers, learning Git is very important. Before jumping into commands, I first wanted to understand what Git actually is. Git is an open-source version control system. In very simple words, it helps us keep track of changes in our code. If we change something, Git remembers it. If something goes wrong, we can go back to an earlier version. It also helps many developers work on the same project without messing up each other’s work. While practicing on my AWS machine, I started trying some basic Git commands. These are the commands developers use in almost every project. At first they looked simple, but after practicing them, I began to understand how they all connect together in real development. So I wrote these notes in simple words to help myself remember them and maybe help other beginners too. 𝗚𝗶𝘁 𝗶𝗻𝗶𝘁: This command starts a Git repository in your project folder. It tells Git to begin tracking your files. 𝗚𝗶𝘁 𝗮𝗱𝗱: This command adds your files to the staging area. It prepares the files so they can be saved in the next commit. 𝗚𝗶𝘁 𝗰𝗼𝗺𝗺𝗶𝘁: This command saves your changes in Git along with a message that explains what you did. 𝗚𝗶𝘁 𝗿𝗲𝗺𝗼𝘁𝗲 𝗮𝗱𝗱 𝗼𝗿𝗶𝗴𝗶𝗻: This connects your local project to a remote repository, usually on GitHub. 𝗚𝗶𝘁 𝗽𝘂𝘀𝗵 𝗼𝗿𝗶𝗴𝗶𝗻 𝗺𝗮𝘀𝘁𝗲𝗿: This sends your code from your computer to the remote repository. 𝗚𝗶𝘁 𝗰𝗹𝗼𝗻𝗲: This command downloads a project from a remote repository to your local machine. 𝗚𝗶𝘁 𝗳𝗼𝗿𝗸: Fork means creating your own copy of someone else’s repository on GitHub so you can work on it independently. You can also check out my repository where I shared more commands and practice notes. https://git.new/aDk18Mn By learning and practicing these commands, I started understanding how to manage code using Git and how developers work together on real projects. Stay tuned ,I’ll be sharing more about my journey into DevOps. 🚀 #DevOps #Git #VersionControl #LearningInPublic #DeveloperJourney #CloudComputing #AWS #TechLearning #OpenSource #SoftwareDevelopment #BeginnerDeveloper #ContinuousLearning Tahira Bibi
Mastering Git for DevOps: Essential Commands for Developers
More Relevant Posts
-
🚀 Why Git & GitHub Commands Are So Important for Developers and DevOps Engineers Recently, I created a Git Command Cheat Sheet to simplify daily development and DevOps tasks. While working on it, I realized how powerful Git and GitHub commands are in modern software development. 🔹 Version Control Git helps track every change made in the codebase. Developers can easily go back to previous versions, compare changes, and maintain a complete history of the project. 🔹 Collaboration With GitHub, multiple developers can work on the same project simultaneously using branches and pull requests, making teamwork more efficient and organized. 🔹 Code Safety & Backup Git ensures that code is safely stored and managed. Even if mistakes happen, commands like git revert, git reset, and git stash help recover work quickly. 🔹 Branching & Experimentation Developers can create separate branches to develop new features or fix bugs without affecting the main codebase. 🔹 CI/CD Integration Git integrates easily with DevOps tools like Jenkins, GitHub Actions, Docker, and Kubernetes, enabling automated build, testing, and deployment pipelines. 🔹 Transparency & Code Review GitHub enables pull requests and code reviews, which improve code quality and help teams maintain clean and reliable code. 💡 Conclusion: Mastering Git commands is essential for developers and DevOps engineers because it improves collaboration, code management, and automation in modern software development workflows. 📌 I recently created a Git Commands Cheat Sheet to make these commands easier to remember and use in daily work. #Git #GitHub #DevOps #AWS #Linux #CloudComputing #CICD #SoftwareDevelopment
To view or add a comment, sign in
-
🚀 Day 50 of my Learning Journey – Git Workflow 💻📘 Discovered how real-world developers manage and collaborate on code using Git and GitHub. Learning the Git workflow unlocked a clearer understanding of how projects move from local development to production-ready code. 📘 What is Git Workflow? Git workflow is the structured process of tracking, saving, sharing, and updating code using Git and GitHub. It helps developers manage changes, collaborate efficiently, and maintain clean project history. From startups to large tech companies, Git workflows are used daily to manage software development and DevOps pipelines. 💻 Key Commands & Concepts I Learned 🔹git add . – Stages all modified files to prepare them for commit. 🔹git commit -m "message" – Saves changes locally with a meaningful message. 🔹git push – Uploads local commits to the remote GitHub repository. 🔹git pull – Fetches and merges latest changes from the remote repository. 🔹git fetch – Downloads updates from remote without merging. 🔹git merge – Combines changes from different branches into one. 🎯 Key Takeaway I understood that Git is not just about commands — it's about maintaining structured collaboration and clean version history, which is essential for my DevOps and Cloud career. ⚙️ Real-World & Industry Usage 🔹Production Servers – Teams push stable code to repositories before deployment. 🔹Cloud Infrastructure – Infrastructure as Code (IaC) files are version-controlled using Git. 🔹CI/CD Pipelines – Tools like Jenkins and GitHub Actions trigger builds automatically on git push. 🔹Team Collaboration – Multiple developers work on branches and merge changes safely. 🔹Monitoring & Rollback – Git history allows quick rollback if a deployment fails. Every day, I’m getting closer to becoming a confident DevOps & Cloud Engineer 📈 #Git #GitHub #DevOpsJourney #LearnInPublic #CloudComputing #SoftwareDevelopment #CareerGrowth
To view or add a comment, sign in
-
-
🔥 DevOps Learning Series – Day 22 to Day 28 Git & GitHub – The Backbone of Modern DevOps This week completely changed the way I look at Git. During Day 22–28, I went beyond basic commands and focused on how Git actually works internally and how it powers collaboration in real-world engineering teams. 🚀 What I Learned (With Real Understanding) 📘 Core Git Fundamentals I learned how Git actually works internally, how it stores snapshots instead of file differences, and how the three main areas work together: 🔹Working Directory (where we write code) 🔹Staging Area (where we prepare changes) 🔹Repository (where Git permanently tracks history) Understanding this flow made commands like add, commit, and log much more meaningful. 🌿 Branching & Merging in Real Projects Branching is what allows multiple developers to work safely at the same time. I practiced: 🔹Creating feature branches 🔹Switching between branches efficiently 🔹Merging changes properly 🔹Handling merge conflicts (instead of being scared of them) I also understood the difference between merge and rebase, and how each affects commit history. 🛠 Advanced Git for Production Safety I explored powerful commands like: 🔹git reset (soft, mixed, hard) to modify history 🔹git revert for safe rollbacks 🔹git stash to temporarily save work These commands showed me something important: DevOps is not about avoiding mistakes. It’s about being able to recover quickly and safely. 🚀 GitHub & DevOps Integration GitHub is not just for storing code. I learned how: 🔹Pull Requests improve code quality 🔹Code reviews create accountability 🔹Branch protection prevents accidental production pushes This is where Git connects directly to DevOps automation. Every deployment pipeline begins with a push. I’ve documented everything in detail here 👇 🔗 https://lnkd.in/g4bfCg93 Next up: Docker🚀 What was the most confusing Git concept for you when you started let me know in the comment section? #DevOps #Git #GitHub #VersionControl #LearningInPublic #CloudComputing #Automation #TechJourney #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham
To view or add a comment, sign in
-
Day 15 of Learning Tech Git Fundamentals Today in class, we started learning Git fundamentals, which is an important tool used by developers and DevOps engineers to manage and track changes in code. We learned that Git is a version control system that helps teams track changes, collaborate on projects, and maintain different versions of their code. We also covered basic Git operations, which include creating a repository, adding files, committing changes, and managing project history. Another important concept we learned was the local Git workflow. This is the process of working with files on your local machine before sharing them with others. It usually involves staging files and committing changes to the repository. We were also introduced to the remote Git workflow, which allows developers to connect their local repository to a remote platform like GitHub so they can push their code, collaborate with others, and manage projects online. Finally, we discussed some troubleshooting tips that help resolve common Git issues when working with repositories. We were asked to create a GitHub account, install Git on our local machines, and practice using Git commands in the homework. Learning Git is a big step because it is one of the most essential tools in modern software development and DevOps workflows. TS Academy #Devops #cloudcomputing #Git #Buildinginpublic
To view or add a comment, sign in
-
-
🚀 Understanding Git Basics – A Quick Guide for Beginners & Professionals Git is one of the most essential tools for developers and DevOps engineers. Here’s a simple breakdown of how Git works and its core concepts: 🔹 Basic Git Commands ✔️ git --version – Check Git version ✔️ git init – Initialize a repository ✔️ git status – Check file status ✔️ git config --global user.name / user.email – Configure user details 🔹 Git Workflow (Stages) Git works with the following flow: 📂 Working Directory → 📌 Staging Area → 📦 Local Repository → ☁️ Remote Repository 1️⃣ Working Directory – Where you create and modify files 2️⃣ Staging Area – Prepares files for commit (git add) 3️⃣ Local Repository – Stores committed changes (git commit) 4️⃣ Remote Repository – Shared repository (GitHub/Bitbucket) 🔹 Types of Repositories ✔️ Local Repository – Exists on your machine ✔️ Remote Repository – Centralized and shared with team 🔹 Important Concept 💡 Git commit is a 2-step process: git add → Move files to staging area git commit → Save changes to local repository ⚠️ Commit applies only to staged files, not directly from the working directory. 🔹 Key Commands ✔️ git add . – Add files to staging ✔️ git commit -m "message" – Commit changes ✔️ git push – Push to remote repository ✔️ git pull – Get latest changes ✔️ git clone <url> – Copy remote repo to local 🔹 Developer Workflow Clone repository Make changes Add files (git add) Commit (git commit) Push (git push) 💬 Key Takeaways ✅ Git uses a 3-stage workflow ✅ Commit is always a 2-step process ✅ Remote repositories enable collaboration ✅ Every developer works on their own local copy #Git #DevOps #VersionControl #Learning #TechBasics #SoftwareDevelopment
To view or add a comment, sign in
-
Day 21 of learning Tech. I continued learning about Git and why it is such an important tool for developers and DevOps engineers. Before Git, version control was often done manually, which made it easy to lose changes or create confusion when multiple people worked on the same project. Git helps solve this by creating a structured history of changes, enabling safe experimentation with branches, and making collaboration much easier. One of the first commands I learnt is git init, which creates a new repository and adds a hidden .git folder that stores the project’s version history. I also learned about git clone, which allows you to download a project from GitHub to your local computer. Another important concept is the staging area, where files are prepared before being committed. Commands like git add and git add . move changes to the staging area, while git commit creates a snapshot of the project at a specific point in time, including the reasons for the changes and who made them. I also explored branching. Branches allow developers to work on new features without affecting the main project. Using commands like git branch and git switch, we can easily create and move between branches. To track project changes, we can use commands like git status, git diff, and git log. These commands help us see file changes, staged files, and the full history of commits. Finally, I learned how to collaborate with others using git push to upload changes to GitHub and git pull to download updates from the remote repository. I also saw the importance of the .gitignore file, which tells Git which files should not be tracked. Step by step, I'm building a deeper understanding of Git and how it helps teams manage code and collaborate effectively. TS Academy #Devops #Cloudcomputing #git #Buildinpublic #learnwithTs
To view or add a comment, sign in
-
-
🚀 Day 56 of My Learning Journey – Git Restore 📘💻 Explored how to safely undo changes using Git! I discovered the power of Git Restore, a command that helps developers revert unwanted changes in their files without affecting the entire project history. 📘 Understanding Git Restore Git Restore is a command used to restore files in the working directory to a previous state. It helps developers discard unwanted changes or recover files from the staging area. This is important because while developing software, we often make mistakes or experiment with code. Git Restore allows us to safely undo those changes without breaking the project. It is commonly used in software development workflows and version control management. ⚙️ Key Commands & Features 🔹git restore <file> – Discards changes in the working directory and restores the file to the last committed state. 🔹git restore --staged <file> – Removes a file from the staging area but keeps the changes in the working directory. 🔹git restore --source=<commit> <file> – Restores a file from a specific commit. 🔹Working Directory Recovery – Helps undo accidental edits in files quickly. Safe Change Management – Allows developers to revert changes without rewriting Git history. 🎯 Key Takeaway Understanding Git Restore helps me manage mistakes efficiently and maintain a clean development workflow — an essential skill for a DevOps and Cloud career. ☁️ Real-World Usage in Industry 🔹Production Code Management – Developers restore files when incorrect changes are pushed during development. 🔹CI/CD Pipelines – Teams revert specific file changes before triggering automated builds and deployments. 🔹Cloud-Based Development – Engineers working on cloud infrastructure scripts use restore to recover configuration files. 🔹Team Collaboration – Helps maintain clean repositories when multiple developers work on the same project. #Git #GitHub #DevOpsLearning #LearnInPublic #TechJourney #VersionControl #CareerGrowth
To view or add a comment, sign in
-
-
🚀 Deploying My DevOps Portfolio – Learning Through Real Issues Today I worked on deploying my React + Vite DevOps Portfolio to GitHub Pages. While setting it up, I ran into several real-world Git and deployment issues — and fixing them turned into a great learning experience. Here are some challenges I faced 👇 🔹 SSH Authentication Issue While running git fetch, I received: Permission denied (publickey) ✔️ Fixed by generating an SSH key and adding it to GitHub. 🔹 Read-Only SSH Key Issue While pushing the branch: ERROR: The key you are authenticating with has been marked as read only. 💡 Lesson learned: I had added the key as a Deploy Key (read-only) instead of a User SSH Key. After moving it to GitHub → SSH Keys, push access worked. 🔹 Branch Tracking Issue Git showed: There is no tracking information for the current branch. ✔️ Fixed by linking the branch: git push -u origin devops/portfolio 🔹 Nested Git Repository Issue Git failed while adding files because a folder inside the project had its own .git repository. ✔️ Solution: Removed the inner .git directory and committed normally. 🔹 Deploying Vite App to GitHub Pages Configured deployment using gh-pages, updated package.json, and successfully deployed the project. 💡 Key Learning DevOps is not just about using tools. It's about debugging issues, understanding Git behavior, and solving real deployment problems step by step. Every issue solved adds another layer of experience. I’m currently building my DevOps portfolio with CI/CD, Docker, and cloud deployments. If you have suggestions or best practices for deploying React/Vite projects with DevOps workflows, I’d love to hear them. #DevOps #Git #GitHub #CI_CD #React #Vite #LearningInPublic #OpenToWork
To view or add a comment, sign in
-
-
🚀 Day 22 of My DevOps Journey — Mastering Git Fundamentals Today I focused on strengthening my understanding of Git workflows, which are at the heart of modern software development and DevOps practices. Here’s what I worked on today 👇 🔹 Installed and configured Git Set up Git identity and verified the configuration to ensure commits are properly tracked. 🔹 Created a Git project Initialized a new repository devops-git-practice and explored the hidden .git directory to understand how Git stores project history and metadata. 🔹 Built a Git commands reference Created a git-commands.md file documenting commonly used Git commands with explanations and examples. 🔹 Practiced staging and committing Learned the difference between git add and git commit, staged files, and created meaningful commits to track changes effectively. 🔹 Built commit history Repeated the edit → stage → commit workflow multiple times to understand how Git maintains a clean and traceable history. 🔹 Documented Git workflow concepts Added notes explaining: Working Directory vs Staging Area vs Repository Purpose of the staging area What git log shows Importance of the .git folder This exercise helped me clearly understand the Git workflow used in real DevOps environments. 📂 GitHub Repository: https://lnkd.in/gQNbz24C #DevOpsJourney #Git #VersionControl #LearningInPublic #DevOps #OpenToWork #ContinuousLearning #90DaysOfDevops #TrainWithShubham
To view or add a comment, sign in
-
Weekly DevOps Class Update – Understanding the Power of Git This week in our DevOps class, we explored the power of Git and why every DevOps engineer must develop a deep understanding of Version Control Systems. Without version control, it becomes nearly impossible to properly track, manage, and maintain code written and pushed by developers—or even infrastructure configurations created by DevOps engineers themselves while working with Infrastructure as Code (IaC) tools. Git introduces structure, accountability, collaboration, and traceability into modern software development and operations. We began with foundational commands, helping students understand how version tracking starts: git init – initialize a repository git add . – stage changes git commit -m "message" – save changes with meaningful history After practicing through class exercises, we progressed into intermediate Git concepts and commands, including: git status – check repository changes git log – view commit history git branch – create and list branches git checkout / git switch – move between branches git merge – combine changes from another branch git pull – fetch and integrate remote updates git push – send commits to a remote repository git clone – copy an existing repository git diff – compare changes between commits or files Students began to see how Git supports collaboration, experimentation through branching, and safe code evolution without fear of losing progress. In addition, a solid Bash scripting project was assigned—building on last week’s lessons—to help students internalize the concept of automation, a core principle in DevOps practice. Progress has been encouraging. Each week, the students are connecting concepts together, and the foundation being built now will make upcoming topics much easier to understand and apply. Looking forward to another impactful week of learning and growth. Conclase Academy Conclase #DevOps #Git #VersionControl #BashScripting #Automation #InfrastructureAsCode #TechEducation #LearningJourney #DevOpsTraining
To view or add a comment, sign in
-
Explore related topics
- How to Understand Git Basics
- How to Use Git for Version Control
- Essential Git Commands for Software Developers
- How to Use Git for IT Professionals
- DevOps Principles and Practices
- Open Source Tools Every Developer Should Know
- Tips for Continuous Improvement in DevOps Practices
- Best Practices for DEVOPS and Security Integration
- How to Optimize DEVOPS Processes
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development