By design, Git does not track empty directories. But sometimes, you need a folder structure in place — for logs, uploads, or runtime-generated files. Solution: Add a .gitkeep file inside the empty directory. It’s a convention (not a built-in Git feature) that ensures Git tracks the folder without actual content. Pro tip: Use .gitkeep only when necessary. Avoid polluting repos with unused structure. 👉 Full guide: https://lnkd.in/d4E6Zvt7 #GitTips #DevOps #GitKeep #VersionControl #VSYSHost
How to keep empty directories in Git with .gitkeep
More Relevant Posts
-
Your commit messages tell everyone how much you care about your code. And most of them are terrible. "update code" "fix bug" "changes" Sound familiar? 𝗪𝗵𝘆 𝗧𝗵𝗶𝘀 𝗔𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗠𝗮𝘁𝘁𝗲𝗿𝘀 When production breaks at 2am, your team digs through git history to find what changed. Bad commits waste hours of debugging time. 𝗚𝗼𝗼𝗱 𝗰𝗼𝗺𝗺𝗶𝘁𝘀 𝗵𝗲𝗹𝗽 𝘆𝗼𝘂: • Understand why decisions were made • Track down bugs faster • Onboard new developers smoothly • Look professional when companies check your GitHub 𝗧𝗵𝗲 𝗦𝗼𝗹𝘂𝘁𝗶𝗼𝗻 Found a tool that automatically rewrites messy commits into professional, conventional format. 𝗪𝗵𝗮𝘁 𝗺𝗮𝗸𝗲𝘀 𝗶𝘁 𝘀𝗺𝗮𝗿𝘁: • Analyzes your code changes and generates meaningful messages • Scores commit quality and only fixes bad ones • Supports 20+ languages for commit messages • Creates automatic backups before changing anything • Works with OpenAI or runs completely offline with Ollama 𝗧𝗵𝗿𝗲𝗲 𝗪𝗮𝘆𝘀 𝘁𝗼 𝗨𝘀𝗲 𝗜𝘁 𝗢𝗽𝘁𝗶𝗼𝗻 𝟭: 𝗖𝗹𝗲𝗮𝗻 𝗲𝘅𝗶𝘀𝘁𝗶𝗻𝗴 𝗵𝗶𝘀𝘁𝗼𝗿𝘆 Perfect before open sourcing a project or submitting a pull request. Process your last few commits or your entire branch. 𝗢𝗽𝘁𝗶𝗼𝗻 𝟮: 𝗜𝗻𝘀𝘁𝗮𝗹𝗹 𝗴𝗶𝘁 𝗵𝗼𝗼𝗸𝘀 One command sets up automatic commit improvement. Every commit gets formatted properly without you thinking about it. 𝗢𝗽𝘁𝗶𝗼𝗻 𝟯: 𝗧𝗲𝗮𝗺 𝘄𝗼𝗿𝗸𝗳𝗹𝗼𝘄𝘀 Add pre-push hooks so commits get cleaned before they reach your main branch. Great for maintaining standards across teams. 𝗥𝗲𝗮𝗹 𝗕𝗲𝗻𝗲𝗳𝗶𝘁𝘀 • Save 30 seconds per commit thinking of good messages • Get professional conventional commits automatically • Customize templates for your team standards • Preview changes with dry run mode before applying • Works on feature branches without disrupting shared repos 𝗧𝗵𝗲 𝗕𝗼𝘁𝘁𝗼𝗺 𝗟𝗶𝗻𝗲 Clean git history saves time, prevents bugs, and shows you care about your craft. #SoftwareEngineering #GitTips #DeveloperTools #CleanCode #OpenSource #WebDevelopment #CodingBestPractices #DevLife
To view or add a comment, sign in
-
-
How much time do you lose switching between your terminal and the browser just to manage a pull request? You write code, git push, open the browser, find the repo, create the PR, wait for CI, refresh the page, check the status, switch back to your editor... this context switching is a major productivity killer. What if you could do it all from the command line? Enter the official GitHub CLI (`gh`). It's a game-changer for streamlining your entire development workflow, keeping you focused and in the flow state. It brings the whole pull request lifecycle right into your terminal. Here's a typical workflow, simplified: 1. Create a PR: `gh pr create --fill` 2. Check CI status: `gh pr checks` 3. View changes: `gh pr diff` 4. Checkout a PR locally: `gh pr checkout [number]` 5. Merge when ready: `gh pr merge` No more clicking around the UI. You stay in your terminal, where you're most productive. It's faster, scriptable, and integrates beautifully into your existing Git habits. If you aren't using the GitHub CLI yet, I highly recommend giving it a try. It’s one of those tools that, once you start using it, you'll wonder how you ever lived without it. What's your favorite `gh` command or tip? #GitHub #DevOps #DeveloperTools #CLI #Productivity #OpenSource #Git #DevEx
To view or add a comment, sign in
-
-
🚀 Lately I’ve been rethinking how I deploy — not just to automate, but to trust every release. I built a hybrid CI/CD setup using the best of both worlds: ✅ GitHub Actions for quick feedback — Pint formatting, builds, and Pest tests to staging. ✅ GitLab CI for production — semantic versioning, tagging, and safe rollouts via Deployer. To keep things reliable post-deploy, I’ve been using Laravel Nightwatch — it monitors for errors and emails me instantly whenever something goes wrong. The combo gave me faster feedback, auditable releases, zero overlapping deploys — and real peace of mind. Big takeaway: you don’t need one CI/CD tool to ship confidently. Use what works best for each stage. #DevOps #CICD #GitHubActions #GitLabCI #Laravel #Deployer #Nightwatch #Automation #SoftwareEngineering
To view or add a comment, sign in
-
-
Git rebase is one of the most powerful yet misunderstood commands in a developer’s toolkit. While many engineers reach for merge by default, mastering when and how to rebase safely can turn a messy commit history into a clean, linear narrative that clearly tells your project’s story. 💡 The golden rule of rebasing Never rebase commits that exist outside your repository, especially those others may have based their work on. Breaking this rule can lead to rewritten history, lost work, and serious team headaches. When to use rebase effectively? -Local cleanup before pushing: Use interactive rebase (git rebase -i) to combine related commits, fix commit messages, and organize work into logical chunks. This helps create a professional-grade commit history before sharing it with your team. -Feature branch integration: Rebasing a feature branch onto main (git rebase main) creates a linear history without merge commit noise making the project timeline cleaner and easier to follow. -Conflict resolution advantages: Rebase surfaces conflicts one commit at a time, making them easier to handle compared to merge’s all-at-once approach. Safety best practices ✅ Always create a backup branch before complex rebases. ✅ Keep interactive sessions small, focus on 3–5 commits for clarity and control. What other useful Git commands have made your workflow smoother? Let’s discuss in the comments 👇 https://lnkd.in/gHZd6f5M #Git #VersionControl #FrontendDevelopment #WebDevelopment #greatfrontend
To view or add a comment, sign in
-
-
Introducing RunnerPilot – Manage On Premise GitHub Action Runners On The Fly Repo: https://lnkd.in/gzVmdpej Manage GitHub Action self-hosted runners effortlessly with a web-based platform. What it does: > Create, manage & monitor runners across repositories > Role-Based Access Control (RBAC) & workspace management > Docker-based runner deployment > JWT-based authentication 💡 Use Cases • DevOps teams managing multiple repositories • CI/CD automation for fast deployments • Companies needing secure and scalable self-hosted runners • Monitoring and auditing of runner activities • Multi-environment workflow orchestration Tech Stack: - Backend: FastAPI, Peewee ORM, Pydantic, Docker SDK - Frontend: React, TypeScript, Vite, Tailwind CSS, Radix UI - Infrastructure: Docker, Docker Compose Key Features: - Runner instance creation & deletion - System monitoring & logs - Multi-repo support Coming Soon: 🚧 Overview dashboard 🚧 Multi-node runner architecture 🚧 Advanced Docker deployment 💡 Get Started Quickly: Just Follow the Comprensive Readme Over the Github. Take your GitHub Actions workflow to the next level! #GitHubActions #DevOps #CI_CD #SelfHostedRunners #Automation #Docker #FastAPI #ReactJS #TypeScript #TailwindCSS #RBAC #WorkflowAutomation #OpenSource #TechTools #DeveloperTools #CloudDevOps #ContinuousIntegration #ContinuousDeployment #RunnerManagement #SoftwareEngineering #WebDevelopment Let's Discuss if you are interested !!! Me: https://lnkd.in/gvJb5AeR Github: https://lnkd.in/gQaYbKVA Linkedin: https://lnkd.in/gGrtzrS6 Discord: https://lnkd.in/dvpEBvP8
To view or add a comment, sign in
-
-
𝐆𝐢𝐭 𝐌𝐞𝐫𝐠𝐞 𝐂𝐨𝐧𝐟𝐥𝐢𝐜𝐭𝐬, 𝐖𝐡𝐲 𝐓𝐡𝐞𝐲 𝐇𝐚𝐩𝐩𝐞𝐧 & 𝐇𝐨𝐰 𝐓𝐨 𝐇𝐚𝐧𝐝𝐥𝐞 𝐓𝐡𝐞𝐦 If you’ve ever opened a Pull Request and seen: “This branch has conflicts that must be resolved” Then you’ve met a merge conflict I didn’t get it at first Conflicts happen when Git can’t automatically combine changes Usually it’s something like: You and a teammate edited the same line or one branch deleted a file while the other changed it Or the code was rearranged in a way Git can’t align Git is basically saying “I need a human to decide what’s correct” Here’s how it works in practice You push your branch and open a Pull Request GitHub tries to merge it into main, if changes overlap, Git stops and it shows the conflict Now you have to resolve it locally Open the file and you’ll see markers like this: <<<<<<< HEAD Current code in main branch ======= Your changes in feature branch >>>>>>> feature-branch Decide which version to keep, or combine them, or keep some changes and remove others. Or just add spacing between both changes, maybe you pushed after someone else pushed meaning you were editing on older code which created a conflict Remove the markers, save the file, commit and push Merge conflicts aren’t errors, they’re part of collaborative coding But when they happen, it’s just Git asking for your judgment #git #versioncontrol #dev #CoderCo #cloudengineering #DevOps #mergeconflict
To view or add a comment, sign in
-
-
Picture this: It’s 2 AM, you’re rushing to deploy a critical fix, and you accidentally commit code with a glaring syntax error. The CI pipeline fails, your team gets paged, and what should have been a quick fix turns into an hour-long debugging session. Sound familiar? This scenario plays out in development teams worldwide, but it doesn’t have to be your story. Enter Git pre-commit hooks — your automated quality control system that catches issues before they ever leave your local machine. https://lnkd.in/ep7hgnU4
To view or add a comment, sign in
-
Flow: git add We run git add all the time, but under the hood, it’s doing a lot more than most people realize. When you stage a file like hello.txt, three major things happen 1️⃣ Hashing & Blob Creation. Git reads your file byte by byte and prepends a small header: blob <size>\0 It then hashes that data, producing a unique SHA-1 fingerprint (like abcd1234ef567890...). That compressed version is stored inside: .git/objects/ab/cd1234ef567890... This is your blob object. It holds your file’s actual content. 2️⃣ Updating the Index. Git updates its internal tracker, the index (also called the staging area). It records which blob corresponds to which file: hello.txt → abcd1234 (blob) This map lives in .git/index, and it’s how Git knows what’s ready to commit. 3️⃣ Marking Ready for Commit. No branches change yet. No commits yet. You’ve just told Git: “Keep this exact version of hello.txt ready for my next commit.” Explore the Flow. You can zoom, pan, and trace how hello.txt moves through Git’s internals right here: https://lnkd.in/gXVpWgQq That’s the real story behind git add. It’s not just “adding a file”; it’s Git quietly building its internal universe. Next up in the Flow series: git commit the moment everything gets locked into history. #GitFlow #VersionControl #CodingInsights #GitAddExplained #DeveloperLife #TechEducation #SoftwareDevelopment #GitMagic #CommitmentToCode #LearnGit
To view or add a comment, sign in
-
-
Inspired by Fabrizio Ferri-Benedetti, I created (well... prompted Claude to create) several VS Code extensions to help when authoring and editing @gitlab documentation. The first two here are GitLab-specific but the others can be used by anyone authoring in Markdown. - https://lnkd.in/gwJWAdT3 - https://lnkd.in/gkHzKxpv - https://lnkd.in/gc7kh2fW - https://lnkd.in/ggFqbmav
To view or add a comment, sign in
-
8 months, 827 Git commits, 21k lines of Go code and 15k lines of TypeScript code and 1.0 is ready! The law enforcement community now has a SaaS to manage body worn camera redaction assignment workloads. Digital evidence managers no longer need to bust out Excel to make detailed workload reports for their teams. We've automated the process, so you don't have to! Proof that if you place one foot in front of the other for long enough you can reach any goal! The key for our success was highly detailed to-do lists, and OneNote for everything else! My wife and I turned Agile on its head. We completed entire sprints in a day or two or a week. We iterated, tested, coded, and repeated the process over and over until we got the result we wanted. We still have some loose ends to tighten up but "Go Live" is just around the corner!!!
To view or add a comment, sign in
More from this author
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