Day 28 of #100DaysOfDevOps — Understanding Git Cherry-Pick In collaborative projects, not every branch is ready for merging. Sometimes, you only need one specific change from another branch — that’s where git cherry-pick shines. What is Git Cherry-Pick? git cherry-pick allows you to apply a specific commit from one branch onto another without merging all the commits. This is especially helpful when: You want to move a hotfix or bug patch to the main branch. You only need a specific update from an experimental branch. You want to control exactly what goes into production. Basic Syntax: git checkout <target-branch> git log <source-branch> git cherry-pick <commit-hash> git push origin <target-branch> Example: git checkout master git log feature git cherry-pick abc1234 git push origin master As a DevOps engineer, understanding Git’s branching and commit management tools is essential for maintaining clean, stable, and traceable code releases. Cherry-picking ensures precision — you can promote tested fixes to production without merging incomplete features. I found this Medium post by Amir Mustafa helpful: https://lnkd.in/dNzH3n8W #Git #DevOps #100DaysOfDevOps #KodeKloud #VersionControl
How to use Git Cherry-Pick for precise code releases
More Relevant Posts
-
Day 26 of My DevOps Journey After learning the basics of Git yesterday, today I explored one of its most powerful features - Branching and Merging 🧩 What is a Branch? A branch in Git allows you to work on new features, fixes, or experiments without affecting the main codebase. Think of it like creating a parallel world to code freely you can merge it back later when ready. Common Branching Commands git branch feature-login # Create a new branch git checkout feature-login # Switch to that branch git branch # List all branches git merge feature-login # Merge branch into main git branch -d feature-login # Delete a branch after merging Why Branching Matters in DevOps ✅ Enables multiple developers to work simultaneously ✅ Keeps production (main) stable ✅ Simplifies testing and review ✅ Encourages better workflow and version control Tip: Use meaningful branch names like feature/add-login, bugfix/api-timeout, or release/v2.0 — it helps maintain clarity across teams! How do you manage your Git workflow Git Flow, GitHub Flow, or something custom? Share your approach below 👇 #Day26 #DevOpsJourney #Git #Branching #Merging #GitFlow #GitHubFlow #VersionControl #DevOps #LearningInPublic #Automation #Collaboration #CloudComputing #InfrastructureAsCode
To view or add a comment, sign in
-
🧩 Day 28 of #100DaysOfDevOps — Selective Commit Merging in Git “Excellence is not being the best; it is doing your best in every situation.” — John Wooden Today’s challenge revolved around a real-world Git scenario — merging a specific commit from one branch to another without affecting the rest of the work in progress. Here’s the situation: The Nautilus application development team had a repository located at: 📍 /opt/cluster.git (cloned under /usr/src/kodekloudrepos on the Storage Server in Stratos DC). The repository contained two branches: master (main production branch) feature (active development branch) One developer had made several updates in the feature branch, but only one specific commit — identified by the message “Update info.txt” — was ready to be merged into production. As part of the DevOps team, I: Switched to the master branch to prepare for integration. Identified the target commit on the feature branch using git log. Used a cherry-pick merge to pull only that single commit into master. Verified the merge integrity and ensured no conflicts. Finally, pushed the changes back to the remote repository for deployment readiness. This task perfectly illustrated how precision control in Git can streamline workflows — merging only what’s needed, when it’s needed. In fast-paced DevOps environments, such selective merging avoids instability while keeping production agile and safe. #100DaysOfDevOps #Day28 #Git #GitCherryPick #VersionControl #DevOpsJourney #ContinuousIntegration #SoftwareEngineering #GitOps #TeamCollaboration #TechCommunity #EngineeringExcellence #InfrastructureAutomation #DevOpsCulture #CodeManagement #OpenSource #LearningEveryday #ProblemSolving #CommandLine #CloudComputing #ProfessionalGrowth #AutomationEngineer
To view or add a comment, sign in
-
-
Day 27 of My DevOps Journey Now that we know how to branch and merge in Git, it’s time to understand how teams actually use branches in real projects through Git Workflows. What is a Git Workflow? A Git Workflow defines how developers collaborate using branches from creating features to merging changes into production. It’s the roadmap for teamwork in version control Popular Git Workflows Git Flow Best for large projects and releases. main → Stable production code develop → Integration branch feature/* → New features release/* → Pre-release testing hotfix/* → Quick production fixes Example: git checkout -b feature/login develop git merge feature/login develop git checkout main git merge develop GitHub Flow Simpler — perfect for CI/CD and small teams. Create a branch → Make changes → Open a pull request → Review → Merge → Deploy Example: git checkout -b update-readme git push origin update-readme Trunk-Based Development Developers commit directly to main (with small, frequent commits). Used in high-speed DevOps environments with strong CI/CD pipelines. Tip: Pick a workflow that suits your team size, release frequency, and project complexity. For most teams GitHub Flow is a great starting point! #Day27 #DevOpsJourney #GitWorkflow #GitFlow #GitHubFlow #TrunkBasedDevelopment #VersionControl #CI_CD #Automation #DevOps #Collaboration #LearningInPublic
To view or add a comment, sign in
-
What Is a Branching Strategy in Git? (2025 Guide) 💡 Ever pushed directly to main and instantly regretted it? 😅 It’s time to get serious about Git Branching Strategies the backbone of modern DevOps, CI/CD, and code collaboration. In this new 2025 guide, we break down how branching defines your entire workflow from hotfixes to release pipelines. 🔹 Learn about: Git Flow vs. GitHub Flow vs. Trunk-Based Development When to merge, when to rebase, and when to hold off Feature branching & environment-based branching Best practices for enterprise CI/CD alignment Tools to automate merge approvals & pull requests 🧠 A strong branching strategy isn’t just for version control . it’s about speed, stability, and scalability in your delivery lifecycle. 📘 Read the complete guide: https://lnkd.in/dCHhU_mP #Git #BranchingStrategy #DevOps #VersionControl #GitHub #GitLab #CloudComputing #SoftwareEngineering #CodeManagement #ContinuousIntegration #ContinuousDelivery #DeveloperTools #CodeReview #CICD #Automation #OpenSource #TechCommunity #PlatformEngineering #Programming #SoftwareDevelopment #AgileDevelopment #SRE #CodingBestPractices #InfrastructureAsCode #CloudEngineering #LinuxCloud #TechInnovation #EngineeringCulture #BuildAutomation #DeveloperProductivity
To view or add a comment, sign in
-
-
⚙️ Day 8 – “The First Commit – How Every DevOps Story Begins 💻✨” Every developer remembers their first commit — that tiny line of code that says, “Let’s build something.” 🚀 Here’s how the Git journey actually starts 👇 🧱 git init – The Birth Creates a new Git repository right inside your folder. “git init” → Congratulations, your project just got a heartbeat ❤️ 📋 git status – The Mirror Shows what’s changed, what’s staged, and what’s not. It’s like checking the mirror before your first client demo. 😅 🗂️ git add . – The Staging Area Adds all your new or modified files to the stage. “Everyone ready? Cameras rolling!” 🎬 🖋️ git commit -m "message" – The Declaration Officially records your snapshot in Git history. “Scene 1: System Setup — Take 1.” 🎞️ 🔍 git log – The Memory Lane Displays your previous commits — your timeline of every experiment, bug-fix, and success. Proof that progress is just a bunch of small commits. 💪 💬 Moral of the Story Every DevOps journey begins with: init ➡ status ➡ add ➡ commit ➡ log Five commands. One story. From idea → reality → history. Keep committing — not for GitHub streaks, but because progress deserves documentation. 🧠 ❓ Your Turn What was your first ever commit message? (Confess honestly — was it “first commit”? 😅)
To view or add a comment, sign in
-
DevOps Revisit — Git Branching Strategies 🔀 Git Flow vs Trunk-Based vs GitHub Flow Today, I revisited one of the most fundamental yet often overlooked topics in DevOps — how we branch, collaborate, and deliver code. While exploring Git Flow, Trunk-Based, and GitHub Flow, I realized something simple but powerful: your branching strategy doesn’t just define how you write code — it defines how your team thinks, collaborates, and ships reliably. 💡 Git Flow gave me a sense of structure — perfect for large, versioned releases. ⚡ Trunk-Based showed me what true CI/CD speed looks like — constant integration and feedback. 🚀 GitHub Flow reminded me how simplicity can empower teams to move fast without friction. Each has its own rhythm, and choosing the right one depends on your team’s maturity, automation, and goals. The deeper I went, the more I understood why branching isn’t just a version control strategy — it’s a DevOps philosophy. #DevOpsRevisit #Git #BranchingStrategy #CICD #DevOps #GitFlow #TrunkBasedDevelopment #GitHubFlow #SoftwareEngineering
To view or add a comment, sign in
-
Day 25 of My DevOps Journey Today, I began exploring one of the most powerful and essential tools in the DevOps world — Git 🧑💻 What is Git? Git is a distributed version control system that tracks changes in your codebase, helps you collaborate with others, and ensures every version of your project is safely stored. Instead of manually managing files or folders, Git makes it easy to: Record every change (commit) Revert to older versions Work in parallel with multiple teammates Merge updates efficiently Why Git in DevOps? ✅ Enables collaboration across teams ✅ Tracks changes for audit & rollback ✅ Integrates with CI/CD pipelines (like Jenkins, GitHub Actions) ✅ Forms the backbone of Infrastructure as Code (IaC) Common Git Commands git init # Create a new repository git clone <url> # Download an existing repo git add . # Stage changes git commit -m "msg" # Save changes git status # View current repo state git log # View commit history git push origin main # Upload code to remote repo git pull # Fetch and merge latest changes Tip: Commit often, with clear messages every commit should represent a meaningful change. What do you use for version control GitHub, GitLab, or Bitbucket? #Day25 #DevOpsJourney #Git #VersionControl #GitHub #GitLab #Bitbucket #DevOps #LearningInPublic #Automation #Collaboration #TechLearning #CloudComputing #InfrastructureAsCode
To view or add a comment, sign in
-
🧩 Master Git — The Backbone of Every DevOps Workflow! Before you dive into automation, containers, or CI/CD, you need one thing clear — Version Control. 💡 Why Git is Important in DevOps Every project in DevOps — whether it’s infrastructure code, application code, or configuration — lives in a Git repository. It helps teams collaborate, track changes, roll back versions, and integrate with automation tools like Jenkins, GitLab CI/CD, and GitHub Actions. Without Git, CI/CD pipelines, Terraform modules, or even Docker builds lose their version control foundation. ⚙️ Use Cases of Git in DevOps 🔹 Managing source code for applications and infrastructure 🔹 Collaborating with multiple developers on the same project 🔹 Triggering Jenkins pipelines automatically using webhooks 🔹 Version-controlling Terraform or Ansible scripts 🔹 Tracking deployment history and rollback versions safely 📎 Below Attached: Git Command Cheat Sheet A quick reference guide to all essential Git commands — perfect for daily practice, automation projects, and interview prep. 🚀 Remember: Mastering Git gives you control over your code, your collaboration, and your career! It’s the bridge between development and deployment — the first real step into DevOps. #Git #VersionControl #DevOpsLearning #GitCommands #CheatSheet
To view or add a comment, sign in
-
💡 Day 31 of #100DaysOfDevOps — Understanding Git Stash Sometimes, in the middle of writing code, we need to switch branches or pull the latest updates — but we’re not ready to commit half-done work. That’s where Git Stash becomes a lifesaver. Git stash allows you to temporarily save your uncommitted changes so you can return to them later without losing progress. Here’s a quick breakdown 👇 🧩 Common Git Stash Commands: git stash → Save your current changes git stash push -m "message" → Save changes with a note git stash list → View all stashes git stash apply stash@{1} → Restore a specific stash git stash drop stash@{1} → Delete a specific stash git stash clear → Clear all stashed changes Today’s task involved restoring stashed changes from stash@{1}, committing, and pushing them to origin — a great way to understand how developers can pause and resume work safely. ⚙️ Why it matters: In real DevOps workflows, context switching happens often. Git Stash ensures your work is never lost, and your workspace stays clean while collaborating across branches or handling hotfixes. #Git #DevOps #100DaysOfDevOps #KodeKloud
To view or add a comment, sign in
-
-
Day 35 of #100DaysOfDevOps — Wrapping Up Git with Git Hooks! Today marked the final Git lesson in my DevOps journey so far — and it was all about Git Hooks What I did: Merged a feature branch into the master branch Created a post-update hook that automatically creates a release tag (e.g., release-2025-10-25) whenever changes are pushed to the master branch Tested the hook and verified the tag creation This was the perfect way to end the Git series — automating tasks at the repo level to ensure smooth CI/CD workflows Quick Recap of What I’ve Learned in Git So Far: ✅ Initializing and cloning repositories ✅ Staging, committing, and pushing changes ✅ Working with branches and merges ✅ Reverting and resetting commits ✅ Using stash to save temporary work ✅ Rebasing for a clean linear history ✅ Resolving merge conflicts ✅ Cherry-picking specific commits ✅ Setting up Git Hooks for automation Git has been a powerful foundation for version control and collaboration — next up, we dive into Docker, where we’ll start containerising applications! #100DaysOfDevOps #DevOps #KodeKloud
To view or add a comment, sign in
Explore related topics
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