🚀 From Shell Scripts to Git Commits — Building My DevOps Foundation (Day 21 & 22) Two days. Two core skills. One powerful shift in mindset. 🔥 🧠 Day 21 – Shell Scripting Cheat Sheet: Build Your Own Reference Guide Instead of just writing more scripts… I built something I’ll use for years. 👉 A personal Shell Scripting Cheat Sheet What I included: Variables & user input If-else conditions Loops (for / while) Functions Exit codes Real automation snippets Common mistakes & fixes 💡 Biggest lesson: If you can organize and explain it clearly, you truly understand it. Automation isn’t just about writing scripts. It’s about writing scripts with clarity and confidence. 🔥 Day 22 – Introduction to Git: My First Repository Then I stepped into version control with Git — the backbone of modern DevOps. Today I: ✅ Installed & configured Git ✅ Created my first repository ✅ Explored the hidden .git/ folder ✅ Built git-commands.md (my growing Git reference) ✅ Made multiple clean commits ✅ Understood the workflow deeply Working Directory → Staging Area → Repository Now I understand: Why git add exists What the staging area actually does Why clean commit history matters Git doesn’t just track files. It tracks growth. 🎯 What These Two Days Taught Me 🔹 Documentation strengthens memory 🔹 Automation needs discipline 🔹 Version control protects your progress 🔹 Small daily improvements compound fast Shell scripting taught me to automate. Git taught me to manage change. That’s real DevOps thinking. 🚀 Let’s learn together 👇 #DevOps #Git #ShellScripting #Linux #Automation #90DaysOfDevOps #LearningInPublic #DevOpsKaJosh #TrainWithShubham
Building DevOps Foundation with Shell Scripts & Git
More Relevant Posts
-
🚀 DevOps Learning Series Git Merge vs Git Rebase — two ways to combine code, one way to start arguments 🧑💻🍿 When multiple developers touch the same repo, Git has two main ways to bring branches together: Merge and Rebase. - Both work. - Both are powerful. - Both can ruin your day if used wrong. 🔀 Git Merge (The Honest Historian) git merge feature-branch What it does: - Combines branches - Keeps complete commit history - Creates a merge commit 🧠 Think of it like: Two timelines meeting and saying “Let’s record exactly what happened.” ✔ Safe ✔ Transparent history ✔ Good for shared branches 🧹 Git Rebase (The History Cleaner) git rebase main What it does: - Replays your commits on top of another branch - Creates a linear history - No extra merge commit 🧠 Think of it like: Pretending your branch started from the latest code all along. ✔ Cleaner commit history ✔ Easier to read logs ✔ Preferred before merging PRs ⚠️ DevOps Golden Rule Never rebase shared or public branches. Because rewriting history in a team repo is like editing the past in a shared Google Doc 😅 💡 TL;DR merge → honest history rebase → clean history Both are useful. Just don’t time-travel in a shared branch 🚀 #DevOps #Linux #CloudComputing #SystemAdministration #LearningInPublic #TechCareers #TrainWithShubham
To view or add a comment, sign in
-
-
DevOps Bootcamp Journey – Week 3 🚀 Git Debugging Lesson – Broken Rebase State 🔴 The Problem While practicing a Git workflow with feature branches, I ran into an issue that took some debugging to understand. After merging my branch feature/database-connection, I tried to clean up and delete the branch locally. Instead of deleting, Git kept prompting errors related to directories inside .git. At the same time, my terminal prompt suddenly showed: (|REBASE) Running git status revealed: You are currently rebasing (all conflicts fixed: run "git rebase --continue") But when I tried to continue the rebase, Git responded with: warning: could not read '.git/rebase-merge/head-name' ⚠️ Root Cause It turned out my repository was stuck in a broken rebase state. Git thought a rebase was still in progress, but some of the internal rebase files were already missing. My repo is also stored inside OneDrive, which can sometimes lock or interfere with files inside the .git directory. 🛠 Fix Commands I Used git status git rebase --continue git rebase --abort rm -rf .git/rebase-merge To recover the repository state, I aborted the rebase: git rebase --abort When Git metadata is already corrupted, another option is to remove the stuck rebase state: rm -rf .git/rebase-merge After that, git status returned to normal and the repository behaved as expected again. 💡 What I Learned - Git operations like rebase can pause and wait for manual intervention - If Git metadata becomes inconsistent, it can leave the repo in a stuck state - Checking git status is the first step when debugging Git issues 🔁 What I’ll Do Moving Forward A few workflow improvements I’ll follow: • Always verify repository state with git status • Complete or abort rebases before running other commands • Avoid keeping Git repositories inside sync tools like OneDrive Small Git issues like this are great reminders that understanding version control internals is just as important as writing code. Curious — what’s the most confusing Git issue you’ve encountered while working with branches or rebasing? 👇 #DevOps #Git #Linux #CloudEngineering #LearningInPublic
To view or add a comment, sign in
-
-
🚀 Git Branching made simple (Merge vs Rebase vs Cherry-pick) Here’s a visual + cheat sheet I wish I had earlier to understand how Git works in real production environments 👇 —> Real-world DevOps use case: In production, the main branch always contains stable and deployable code. When working on a new feature or bug fix, we never modify the main branch directly. Instead: git checkout -b feature-update This allows: ✔ Safe development without breaking production ✔ Independent testing of changes ✔ Multiple developers to work in parallel —> How changes are integrated: • Merge git merge feature-update → Combines history, safe and widely used • Rebase git rebase master → Keeps history clean and linear • Cherry-pick git cherry-pick <commit-id> → Apply only specific changes (useful for hotfixes in production) —> Why this matters in DevOps: - Maintains production stability - Supports CI/CD pipelines - Enables efficient team collaboration - Reduces deployment risks 💡 Key takeaway: Branching is not just a Git feature — it’s a core practice for safe and scalable software delivery in production systems. 📌 Save this for later if you're learning Git Still learning and building in DevOps 🚀 #DevOps #Git #CI_CD #Linux #VersionControl #LearningJourney
To view or add a comment, sign in
-
-
Day 32 of 100 Days of DevOps with KodeKloud 🚀 Git: Rebase Today I explored one of the most powerful and misunderstood Git commands git rebase. Rebase allows you to move or reapply commits from one branch onto another, creating a cleaner and more linear commit history. Today I practiced: 🔹 Rebasing a feature branch onto main 🔹 Understanding how rebase rewrites commit history 🔹 Handling rebase conflicts 🔹 Continuing or aborting a rebase 🔹 Comparing rebase vs merge Key Concept: Merge → Preserves branch history (creates merge commit) Rebase → Rewrites history for a clean linear timeline Example workflow: Feature Branch Created → Main branch updated → Rebase feature onto main → Clean history → Merge without extra merge commit In real DevOps environments: Rebase is useful for: • Keeping commit history clean • Preparing branches before Pull Requests • Avoiding unnecessary merge commits • Maintaining readable project history But rebase must be used carefully especially on shared branches because it rewrites history. Golden Rule: Never rebase a public/shared branch. Understanding the difference between: • Merge (safe for shared branches) • Rebase (clean history, local branches) gives you advanced control over version management. DevOps is not just about shipping fast It’s about maintaining clean, traceable, and professional workflows. 32 days in. From Git basics → to advanced branch control. #100DaysOfDevOps #Git #DevOpsJourney #Rebase #CI_CD #Linux #Automation #FutureDevOpsEngineer
To view or add a comment, sign in
-
-
🚀 New Blog Published: From Git Basics to GitHub Workflows – A DevOps Perspective In my DevOps learning journey, after exploring Linux and Computer Networking, the next important tool I focused on was Git and GitHub. Version control plays a huge role in modern development and DevOps workflows. Whether it’s managing application code, infrastructure as code, or collaborating with teams, understanding Git is essential. In this blog, I’ve tried to explain some important Git and GitHub concepts in a simple and practical way, including: • History of Git • File System vs Version Control System • Important Git commands (init, add, commit, status, rm) • Tracking files in Git • Branching and common branching commands • Clone vs Fork • Push & Pull with SSH / PAT • Rebase vs Merge • Stash and Stash Pop • Cherry Picking • Squash Commit vs Merge Commit • Reset vs Revert • Branching strategies • GitHub CLI • Conflict resolution My goal with this blog was to build a clear understanding of how Git and GitHub workflows fit into DevOps practices. If you are learning DevOps or getting started with Git, I hope this blog will be helpful. 📖 Read the blog here: https://lnkd.in/d-rkRngH I’d love to hear your thoughts and feedback! #DevOps #Git #GitHub #VersionControl #LearningInPublic #DevOpsJourney #DevOpsKaJosh #90DaysOfDevOps #Hashnode #TrainWithShubham #ShubhamLondhe
To view or add a comment, sign in
-
-
🚀 Understanding Git File Lifecycle (with Real Practice) While working on Git, I explored how files move through different stages — and this changed how I use Git daily 👇 🔄 Git File Lifecycle Every file in Git goes through these states: 1️⃣ Untracked 👉 New files (Git doesn’t know about them yet) 2️⃣ Staged 👉 Files added using git add (ready for commit) 3️⃣ Committed 👉 Files stored in repository (git commit) 4️⃣ Modified 👉 Already tracked file, but changed in working directory 📊 Real-Time Example from My Practice git status -s M disk-usage.sh ?? tests.txt 👉 M = Modified 👉 ?? = Untracked 🔧 Commands I Used ✔️ git add <file> → Move to staging ✔️ git add -A → Add all changes ✔️ git commit -m "message" → Save changes ✔️ git push → Upload to remote repo 📦 Full Workflow I Followed git add calculator.py disk-usage.sh git add disk-usage.txt git commit -m "Local Changes" git push 🔍 Helpful Commands ✔️ git status → Check state ✔️ git status -s → Short view ✔️ git log → Commit history ✔️ git diff → See changes ⚠️ Important Learning 👉 git commit -a works only for tracked files 👉 New files must be added using git add 💡 Key Insight Git is not just commands — it’s a lifecycle system that tracks every change step-by-step. 🔥 Small practice → Strong Git fundamentals How do you track your file changes in Git? 🤔 #Git #DevOps #Learning #VersionControl #AWS #CICD #TechJourney #GitBasics
To view or add a comment, sign in
-
💡 Understanding Git, GitHub, and GitLab: A Must for Every Developer As a software engineer, one of the most important tools in your daily workflow is Git. Yet many developers still confuse the difference between Git, GitHub, and GitLab. 🔹 Git is a distributed version control system that helps you track changes in your code, manage versions, and collaborate efficiently. 🔹 GitHub is a cloud-based platform where you can host your Git repositories, collaborate with other developers, and showcase your work. 🔹 GitLab is another powerful platform similar to GitHub, but with strong built-in DevOps features like CI/CD pipelines and self-hosting capabilities. 🚀 Why Git is essential: 👉 Keeps a complete history of your code 👉 Enables safe collaboration across teams 👉 Helps manage features using branches 👉 Makes debugging and rollback easier 👉 Supports modern development workflows In today’s development world, Git is not just a tool, it’s a core skill. Whether you’re working solo or in a team, mastering Git will significantly improve your productivity and code quality. If you're not using Git regularly yet, now is the time to start! #Git #GitHub #GitLab #VersionControl #SoftwareDevelopment #WebDevelopment #Laravel #ReactJS #DevOps #Programming #Developers #TechCareer #CodeBetter
To view or add a comment, sign in
-
🎒 Imagine learning Git… at a playground! What if complex DevOps concepts were explained the way we learned things as kids — simple, visual, and fun? 🤓 So I created this playful idea where Shinchan’s mom is teaching Git basics to Shinchan at a playground 🛝 while turning it into a DevOps Git Cheat Sheet. Because sometimes the best way to understand technology is by simplifying it. 📌 Git Concepts Covered (Basic → Intermediate) 🟢 git init – Start a new repository 🟢 git add – Stage your changes 🟢 git commit – Save your progress 🟢 git push – Upload code to remote repo 🟢 git pull – Get latest updates from repo 🌿 git branch – Create separate development paths 🔀 git merge – Combine branches together 🔍 git diff – See what changed in the code 📜 git log – Track commit history 💡 In DevOps, Git is the backbone of collaboration and version control. Mastering it is the first step toward becoming a DevOps Engineer. I'm currently exploring the DevOps journey and sharing learning in creative ways so it’s easier for others too. 🚀 👀 If this visual helped you understand Git faster, let me know! ✨ Learning + Creativity = Powerful Combination 🚀 #DevOps #Git #DevOpsJourney #VersionControl #CloudComputing #Linux #GitHub #TechLearning #ContinuousLearning #DevOpsEngineer 😍
To view or add a comment, sign in
-
-
🚀 I just published a new article about Git & GitHub Basics! In this article, I explained: ✅ What is Git ✅ Why we use Version Control ✅ What is GitHub ✅ Branching and collaboration ✅ Pull Requests and team workflow This guide is helpful for beginners who want to understand how developers manage and collaborate on code in real projects. 📖 Read here: https://lnkd.in/gtvdZYRm #Git #GitHub #VersionControl #Learning #DevOps #SoftwareDevelopment
To view or add a comment, sign in
-
𝗗𝗮𝘆 𝟮 – 𝗚𝗶𝘁 𝗖𝗼𝗺𝗺𝗶𝘁𝘀, 𝗥𝗲𝘀𝗲𝘁 & 𝗥𝗲𝗺𝗼𝘁𝗲 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀 🔧 Continuing my Git & GitHub learning journey, today I practiced how developers save changes, undo mistakes, and interact with remote repositories. Understanding these commands is essential for managing real-world code changes. 🔹 𝗖𝗼𝗺𝗺𝗮𝗻𝗱𝘀 𝗜 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝗱 ✨ 𝗧𝗿𝗮𝗰𝗸𝗶𝗻𝗴 𝗮𝗻𝗱 𝗰𝗼𝗺𝗺𝗶𝘁𝘁𝗶𝗻𝗴 𝗰𝗵𝗮𝗻𝗴𝗲𝘀 -> git status – Check current repository status -> git add <file> – Stage changes for commit -> git add . – Stage all changes -> git commit -m "message" – Commit staged changes -> git commit -a -m "message" – Commit all tracked files directly ✨ 𝗨𝗻𝗱𝗼𝗶𝗻𝗴 𝗼𝗿 𝗺𝗼𝗱𝗶𝗳𝘆𝗶𝗻𝗴 𝗰𝗵𝗮𝗻𝗴𝗲𝘀 -> git reset – Unstage files from staging area -> git reset <commit_id> – Move repository back to a specific commit ✨ 𝗪𝗼𝗿𝗸𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗿𝗲𝗺𝗼𝘁𝗲 𝗿𝗲𝗽𝗼𝘀𝗶𝘁𝗼𝗿𝗶𝗲𝘀 -> git clone <repo_url> – Copy repository from remote -> git push – Upload local commits to remote repository -> git fetch – Download updates from remote without merging 🔹 𝗦𝗺𝗮𝗹𝗹 𝗯𝘂𝘁 𝗜𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁 𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 -> Working Directory → The place where you create and modify project files -> Staging Area → Temporary area where changes are prepared before committing -> Repository → Where Git permanently stores the history of commits -> .git Folder → Created when running git init. It stores all repository metadata, commit history, branches, and configuration. This is essentially the brain of the Git repository. 💡 𝗜𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁: If the .𝗴𝗶𝘁 folder is deleted, the project remains but Git tracking and history are lost. 💡 𝗧𝗼𝗱𝗮𝘆’𝘀 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆 Git is not just about saving code — it’s about managing history and collaborating safely. #DevOps #Git #GitHub #CICD #VersionControl #CloudComputing #DevOpsJourney #LearningInPublic #ContinuousLearning #TechCommunity
To view or add a comment, sign in
-
Explore related topics
- DevOps Engineer Core Skills Guide
- How to Use Git for Version Control
- Key Skills for a DEVOPS Career
- How to Use Git for IT Professionals
- Version Control Documentation Strategies
- DevOps Principles and Practices
- Tips for Continuous Improvement in DevOps Practices
- Essential Git Commands for Software Developers
- Advanced Ways to Use Azure DevOps
- 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