Git Rebase: Clean Commit History & Linear Workflow

🚀 DevOps Interview Questions & Answers 📌 Question: What is Git Rebase? Git Rebase is used to move or combine a sequence of commits onto a new base commit. 🔹 It takes commits from one branch 🔹 Re-applies them on top of another branch 🔹 Creates a clean and linear project history 🔹 Avoids unnecessary merge commits 📌 Why use Rebase? ✔ Keeps commit history clean ✔ Makes project history easier to read ✔ Helps maintain a linear workflow 📌 Basic Command: git rebase main 📌 Interactive Rebase (to edit/squash commits): git rebase -i HEAD~3 💡 Important: Avoid rebasing public/shared branches because it rewrites commit history. 👉 Follow Ashok IT School for daily DevOps interview questions 👉 Comment “DEVOPS” for real-time Git & Cloud concepts 👉For DevOps Course Details  Visit:https://lnkd.in/ggFkVtT4 . #DevOps #Git #GitRebase #VersionControl #GitCommands #CI_CD #SoftwareDevelopment #CloudComputing #AshokIT #AshokITSchool

  • text, letter

To view or add a comment, sign in

Explore content categories