🚀Day 34/90 Days DevOps Challenge - Introduction to Git & Basic Commands Today I completed Shell Scripting and started a new tool: Git & GitHub. This marks a shift from scripting to version control, which is a core part of DevOps. Git is a distributed version control system used to track and manage changes in source code efficiently. 🔹 What Git Helps With It tracks: • Who made the changes (author) • What changes were made • When the changes were made It solves major problems like collaboration, tracking code history, and maintaining backups. 🔹 History of Git Before Git, developers faced issues in collaboration and version tracking. Tools like BitKeeper were used but had limitations. Git was introduced by Linus Torvalds in 2005 as a free and open-source solution. 🔹 Git Workflow (Very Important Concept) Working Directory → Staging Area → Local Repository → Remote Repository Understanding this flow is critical. If you skip this, Git will always confuse you. 🔹 Core Git Operations • Adding → Move files to staging area • Committing → Save changes in local repo • Pushing → Upload code to remote repo • Pulling → Download latest changes 🔹 Basic Commands I Practiced • git init → Initialize a repository • git config user.name / user.email → Set identity • git add <file> → Add file to staging • git add . → Add all files • git status → Check file status • git commit -m "message" → Save changes • git log → View commit history • git remote add origin <url> → Connect to GitHub • git remote -v → Verify remote connection • git push origin master → Push code to GitHub 💡Key Learning Git is not about memorizing commands. It’s about understanding the flow of how code moves from your system to a shared repository. 📌 Tomorrow’s Topic: pulling, fetch & cloning in Git #90DaysOfDevOps #DevOps #CICD #Docker #Kubernetes #AWS #terraform #ansible #prometheus #grafana #CloudComputing #InfrastructureAsCode #LearningInPublic #FreshGraduate #CloudEngineer #Linux #Git #GitHub #VersionControl
Git Basics for DevOps: Understanding Git & Core Commands
More Relevant Posts
-
#Day_14 – Advanced Git, GitHub & GitLab Today, I moved ahead with Advanced Git, GitHub, and GitLab, and now I can see how real teams manage code in production. 👉 Git is not just saving code… it is about managing code smartly in teams. 🔹 Git Branching Strategy (Advanced) main / master – production code develop – ongoing development Feature branches – for new features Hotfix branches – for urgent fixes 👉 This helps teams work without breaking main code. 🔹 Advanced Git Commands git clone <url> – copy repo git fetch – get latest changes (without merging) git pull – fetch + merge git stash – save temporary changes git reset – undo changes git revert – safe undo 👉 These commands are used in real-world workflows. 🔹 Merge vs Rebase Merge – keeps full history Rebase – makes clean history 👉 Rebase is useful for clean projects, but needs careful use. 🔹 Conflict Resolution Happens when same file is edited by multiple people Git shows conflict markers Manually fix and commit again 👉 Important skill for teamwork. 🔹 GitHub Advanced Features Pull Requests (PR) Code Reviews Issues & Project boards GitHub Actions (CI/CD basics) 👉 Helps in managing complete development lifecycle. 🔹 GitLab Advanced Features Merge Requests Built-in CI/CD pipelines Runners for automation DevOps lifecycle in one platform 👉 GitLab is powerful for DevOps automation. 🔹 .gitignore & Best Practices Ignore unwanted files (node_modules, logs) Keep repo clean Write meaningful commit messages 👉 Clean code = professional work. 🔹 Tags & Versioning git tag – mark versions (v1.0, v2.0) Helps in releases Easy to track versions 👉 Important for production deployments. 🔹 Why Advanced Git is Important? Handle large projects Work in teams Maintain clean history Support CI/CD pipelines 👉 This is how companies manage real projects. What I realized today: ✔ Git is more powerful than I thought ✔ Team collaboration depends on proper workflow ✔ Clean history and versioning are very important ✔ GitHub/GitLab are full DevOps platforms Learning is now moving towards real industry practices 🚀 Let’s keep learning and growing 💪 #Linux #DevOps #Git #GitHub #GitLab #Day14 #LearningInPublic #ITSkills #CareerGrowth
To view or add a comment, sign in
-
🚀 Git & GitHub – Essential Concepts Every DevOps Engineer Should Know Version control is the backbone of modern development. Whether you're working on Terraform, CI/CD, or cloud automation—Git & GitHub are must-have skills. 🔹 What is Git? Git is a distributed version control system that helps track changes, collaborate efficiently, and manage code across teams. 🔹 What is GitHub? GitHub is a platform built on Git that enables collaboration, code hosting, and version management. 📌 Key Concepts • Repository (Repo): Where your code lives • Commit: Snapshot of your changes • Branch: Parallel version of your code • Pull Request (PR): Way to propose and review changes ⚙️ Basic Git Commands ✔️ git init → Initialize a repository ✔️ git clone → Copy repo from GitHub ✔️ git add . → Stage changes ✔️ git commit -m "message" → Save changes ✔️ git status → Check repo state ✔️ git push → Upload changes ✔️ git pull → Fetch & merge updates 🌿 Branching & Merging ✔️ git branch → Manage branches ✔️ git checkout -b feature → Create & switch branch ✔️ git merge feature → Merge changes ✔️ git rebase main → Reapply commits cleanly 📦 Stashing & Cleaning ✔️ git stash → Save changes temporarily ✔️ git stash pop → Reapply changes ✔️ git clean -f → Remove unwanted files 🌍 Remote Repositories ✔️ git remote -v → View remotes ✔️ git fetch → Download updates ✔️ git remote add origin → Add repo 📊 History & Debugging ✔️ git log --oneline → View history ✔️ git diff → See changes 🏷️ Tagging & Releases ✔️ git tag v1.0 → Mark version ✔️ git push origin --tags → Push tags ⚠️ Advanced (Use Carefully) ✔️ git reset --hard → Remove commits ✔️ git revert → Undo safely ✔️ git rebase -i → Clean commit history 💡 Why Git Matters? ✔️ Better collaboration ✔️ Version tracking ✔️ Faster delivery ✔️ Safer deployments 📘 Based on core Git concepts and commands #Git #GitHub #DevOps #VersionControl #Cloud #Terraform #CI_CD #Automation #TechLearning
To view or add a comment, sign in
-
Git Series | Day 9: Optimization & Deployment — Squash, Cherry-Pick, and .gitignore 🚀 As I near the end of this series, I am focusing on the "polishing" tools that professional DevOps Engineers use to ensure their repositories are clean, secure, and ready for production. 1. Squash: Consolidating the Journey Why show 10 "work-in-progress" commits when one clean commit will do? Squash allows me to combine multiple commits into a single, meaningful entry. The Command: git rebase -i HEAD~number The Workflow: In the interactive editor, I keep the first commit as "pick" and change the others to "squash." The Benefit: It keeps the master branch history concise and high-level for senior reviewers. 2. Cherry-Pick: Surgical Precision Sometimes you don't want an entire branch; you just want one specific fix or feature. The Concept: Picking a single commit from one branch and applying it to another. The Command: git cherry-pick <commit-id> The Use Case: Great for pulling a critical hotfix from a development branch directly into production without bringing unfinished features along. 3. .gitignore: The Silent Guardian A professional repository should never contain logs, environment variables, or temporary build files. The Mechanism: By creating a .gitignore file, I tell Git which files to permanently ignore from tracking. Standard Exclusions: I typically exclude *.log, .env (security), and folders like /db or node_modules. The Result: Smaller repository size and zero risk of pushing sensitive credentials to GitHub. 4. Deployment: Hosting via GitHub Pages Git isn't just for tracking; it’s for delivering. I practiced hosting static web applications directly from a repository. Push your code to a new GitHub repository. Navigate to Settings > Pages. Select the master branch and save. Your application is live and accessible via a public URL! My use of .gitignore ensures that sensitive configuration data and "garbage" files never enter the version control system. I Streamline Code Reviews: By squashing messy development commits before merging. #Git #DevOps #100DaysOfCode #WebDeployment #GithubPages #CleanCode #SoftwareEngineering #SysAdmin #GitIgnore
To view or add a comment, sign in
-
-
Git Series | Day 1: Architecture of Collaboration — From VCS to Distributed Git 🌐 Today, I officially moved beyond local administration into the "Source of Truth" for all modern software development. I shifted from just saving files to understanding the Distributed Version Control System (DVCS) architecture that powers the global tech industry. 1. The Problem: Centralized VCS (The "Old Way") In a traditional VCS, developers are tethered to a single central server. If that server goes down, the entire team’s productivity stops. It represents a "Single Point of Failure" that modern, high-availability DevOps cannot afford. 2. The Solution: Distributed Git (The "New Way") Git revolutionized this by giving every developer a full copy of the repository on their Local System. • Reliability: If the main server fails, any local repository can be used to restore it completely. • Speed: Since the entire history is on my machine, operations like commits and logs happen at lightning speed without needing an internet connection. • Independence: I can work on "Updated Feedback" locally and sync with the remote server (GitHub/GitLab) only when the code is verified and ready. 3. The Developer's "Three Trees" I mastered the internal flow of how Git tracks work: • Working Directory: The actual folder where I am modifying my shell scripts. • Staging Area (Index): The "Waiting Room" where I selectively prepare changes before they are finalized. • Local Repo: The database where my code is officially snapshotted and timestamped as a Commit. #Git #VersionControl #DevOps #SystemArchitecture #100DaysOfCode #SoftwareEngineering #LinuxAdmin #GitHub
To view or add a comment, sign in
-
-
🚀 Day 6 of #100DaysOfDevOps Challenge Today I explored one of the most fundamental pillars of modern software development — Version Control Systems (VCS) and Git 🔥 📌 Here’s what I learned today: 🔹 What is Version Control System (VCS)? A system that tracks changes in code over time, enabling collaboration, history tracking, and easy rollback when needed. 🔹 Why is it important? ✔️ Maintains complete history of changes ✔️ Enables team collaboration ✔️ Supports branching & experimentation ✔️ Ensures code safety and integrity 🔹 What is Git & Why Git? Git is a distributed VCS known for its speed, flexibility, and powerful branching capabilities. It’s widely used in DevOps and CI/CD pipelines. 🔹 Git Stages Explained: 📂 Working Directory – Where you create/modify files 📌 Staging Area – Where changes are prepared (git add) 📦 Repository – Where changes are permanently stored (git commit) 🔹 Git Lifecycle: Modify ➝ Stage ➝ Commit ➝ Push ➝ Pull 🔹 Linux Commands to Install Git: sudo apt install git -y sudo yum install git -y sudo dnf install git -y 🔹 Git Logs: Tracking history using commands like: git log git log --oneline git log --graph 💡 Key Takeaway: Mastering Git is not optional — it’s a must-have skill for every DevOps Engineer to manage code efficiently and collaborate seamlessly. 📈 Every commit you make is a step closer to becoming a better engineer! 🔥 What’s next? Diving deeper into branching strategies and Git workflows! #DevOps #100DaysOfDevOps #Git #VersionControl #Linux #CloudComputing #SoftwareDevelopment #DevOpsJourney #LearningInPublic #TechGrowth #CI_CD #Automation #Programming #Developers #flm #Engineering #CareerGrowth #OpenSource #TechCommunity #BuildInPublic 🚀
To view or add a comment, sign in
-
-
🚀 DevOps Journey – Day 18 / 100 Today I learned real-time Git workflow with multiple developers + GitHub repo management 🔥 ⸻ 🔹 🧑💻 Real-Time Scenario 👨💻 Dev1 → Already developed code & pushed to GitHub 👨💻 Dev2 → New joiner (no code in local system) 👉 What should Dev2 do? ✔️ Clone the Repository • git clone <repo_url> → Entire code + history comes to local ⸻ 🔹 🔄 Clone vs Pull ✅ Clone • First time download • Full repo + all branches ✅ Pull • Get latest changes • Used after clone 💡 Pull = Fetch + Merge ⸻ 🔹 🌿 Branch & Sync • git branch -a → Show local + remote branches 👉 Workflow: 1. Make changes locally 2. git push → Send to GitHub 3. Other dev makes changes 4. git pull → Get updates ⸻ 🔹 🔍 Fetch vs Merge • git fetch origin branch → Check new commits (no merge) • git merge origin/branch → Merge changes into local ⸻ 🔹 ⚙️ GitHub Repository Settings 📌 You can manage repo using UI: • Rename repository • Change default branch • Change visibility (Public → Private) • Transfer ownership • Archive (read-only mode) • Delete repository (Danger Zone ⚠️) ⸻ 🔹 🆚 Git vs GitHub • Git → CLI tool (local system) • GitHub → Web UI (remote repo hosting) ⸻ 💡 Pro Tip: Every developer should know this flow: 👉 Clone → Work → Push → Pull → Repeat This is how real companies work 🚀 #DevOps #Git #GitHub #Linux #VersionControl #100DaysOfDevOps #LearningJourney #Cloud #Automation #RealTime #frontlinemedia #flm #DevSecOps #MultiCloud
To view or add a comment, sign in
-
-
📝 Day 5 of Sharing my DevOps Series... *Git Basics What is Git? Git is a distributed version control system used to: Track code changes Collaborate with teams Manage project history *Why Git is Used? Track code changes Maintain version history Work with multiple developers Rollback to previous versions Work in parallel using branches *Git Architecture Working Directory Where you create/edit/delete files Staging Area Middle layer between working directory & Local repository Stores changes before commit Git Repository Stores all versions, history & metadata Initialize repository git init Check status git status Add file to staging git add file.txt Commit changes git commit -m "First commit" *File States in Git Untracked → New file (not added) Modified → Changed but not staged Staged → Ready to commit *Commands ls # List files ls -a # Show hidden files mkdir folder # Create directory cd folder # Change directory *Git Commit Options git commit -m "message" # Normal commit git commit -am "message" # Add + commit (tracked files only) *What is a Branch? A branch in Git is used to work on features independently without affecting the main code. *List Branches git branch - Shows all available branches Create a New Branch - git branch dev Creates a new branch named dev *Switch Branch git checkout dev git switch dev Move from one branch to another Create + Switch (Shortcut) git checkout -b feature Delete Branch git branch -d dev Deletes branch (safe delete) git branch -D dev Rename Branch git branch -m old-name new-name Rename a branch View All Branches (Local + Remote) git branch -a *Git Logs git log # Full history git log --oneline # Short history *Remote Repository (GitHub) git remote add origin <repo_url> git push origin master- Push local commits to remote repository *main information about git: git init → Initialize repo git add → Stage changes git commit → Save changes git status → Check status git branch → Manage branches git merge → Combine branches git push → Upload to remote git clone → Copy repo #DevOps #CareerGrowth #Cloud #AWS #Infrastructure #CloudComputing #AWS #TechLearning #DevOps #LearningInPublic #TechJourney #git #github
To view or add a comment, sign in
-
-
Headline: From File Searching to Version Control: My DevOps Journey Continues 🚀 This week has been all about mastering the tools that make modern collaboration possible. After diving deep into Linux file management, I’ve shifted my focus to Git and GitHub under the guidance of Shaik Mustafa at Frontlines EduTech (FLM). It’s one thing to write code; it’s another to manage its evolution, track changes, and collaborate across teams seamlessly. 🔍 Key Learning Highlights: The Linux Foundation: Mastering find and locate to navigate the file system like a pro. Git Core Concepts: Understanding the 3 stages of Git (Working, Staging, and Local Repo) and why it is the gold standard for Version Control Systems (VCS). The Essentials: Initializing repositories, configuring identities, and using .gitignore to keep projects clean. Advanced Management: Learning how to amend messages, reset or restore files, and manage commit history effectively. Branching & Merging: I explored how branching enables isolated development and the critical differences between a standard merge and a rebase. Productivity Tools: Using git stash to pivot between tasks without losing progress. Git vs. GitHub: Connecting local workflows to the cloud and understanding the vital "Pull before Push" rule to avoid integration headaches. Working through these topics practically on my local machine has given me a much clearer picture of how high-performing engineering teams function. Every day is a step closer to mastering the DevOps stack! #DevOps #Linux #Git #GitHub #VersionControl #ContinuousLearning #FLM #TechJourney #CloudComputing #SoftwareDevelopment
To view or add a comment, sign in
-
🚀 Git vs GitHub – Clearing the Confusion! Many developers use Git and GitHub interchangeably — but they are NOT the same. Let’s break it down 👇 🔹 What is Git? Git is a distributed version control system. It works locally on your machine and gives you full control over your code. ✅ Track changes ✅ Create branches & merge easily ✅ Work offline ✅ Manage versions without any dependency 💡 In short: Git is your all-in-one tool for code management. --- 🔹 What is GitHub? GitHub is a cloud-based platform built on top of Git. It helps you: ✅ Store code remotely ✅ Collaborate with teams ✅ Manage projects & issues But here’s the catch 👇 ⚙️ For full automation (CI/CD), GitHub often needs integration with: • GitHub Actions / Jenkins • Docker • Kubernetes • Other DevOps tools 💡 So, GitHub = Collaboration + Integration ecosystem --- 🔥 Key Difference Git| GitHub Version Control System| Hosting Platform Works Offline| Requires Internet No dependency| Needs integrations for CI/CD Complete control locally| Team collaboration focus --- 🎯 Final Thought 👉 Git = Engine (Core functionality) 👉 GitHub = Platform (Collaboration + Integrations) Both are powerful — but understanding the difference makes you a smarter developer 💻 #Git #GitHub #DevOps #SoftwareDevelopment #Programming #CI_CD #Developers #TechLearning
To view or add a comment, sign in
-
-
🚀 Git vs GitHub – Clearing the Confusion! Many developers use Git and GitHub interchangeably — but they are NOT the same. Let’s break it down 👇 🔹 What is Git? Git is a distributed version control system. It works locally on your machine and gives you full control over your code. ✅ Track changes ✅ Create branches & merge easily ✅ Work offline ✅ Manage versions without any dependency 💡 In short: Git is your all-in-one tool for code management. --- 🔹 What is GitHub? GitHub is a cloud-based platform built on top of Git. It helps you: ✅ Store code remotely ✅ Collaborate with teams ✅ Manage projects & issues But here’s the catch 👇 ⚙️ For full automation (CI/CD), GitHub often needs integration with: • GitHub Actions / Jenkins • Docker • Kubernetes • Other DevOps tools 💡 So, GitHub = Collaboration + Integration ecosystem --- 🔥 Key Difference Git| GitHub Version Control System| Hosting Platform Works Offline| Requires Internet No dependency| Needs integrations for CI/CD Complete control locally| Team collaboration focus --- 🎯 Final Thought 👉 Git = Engine (Core functionality) 👉 GitHub = Platform (Collaboration + Integrations) Both are powerful — but understanding the difference makes you a smarter developer 💻 #Git #GitHub #DevOps #SoftwareDevelopment #Programming #CI_CD #Developers #TechLearning
To view or add a comment, sign in
-
Explore related topics
- How to Use Git for Version Control
- How to Understand Git Basics
- How to Use Git for IT Professionals
- Essential Git Commands for Software Developers
- Key Skills for a DEVOPS Career
- DevOps Principles and Practices
- Tips for Continuous Improvement in DevOps Practices
- GitHub Code Review Workflow Best Practices
- DevOps Engineer Core Skills Guide
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