The .gitignore Pattern That Broke My CI Build

I spent an hour debugging a failed deployment on Coolify. The Go build was dying at go build ./cmd/server with exit code 1 — no useful error, just silence. The code compiled perfectly locally. Cross-compilation to linux/amd64 worked fine. No platform-specific files. Clean go mod verify. Then I ran git check-ignore -v cmd/server/main.go and saw this: .gitignore:7:server cmd/server/main.go My .gitignore had: # Compiled binary server That single word server — without a leading / — matches any path segment named server. It was silently excluding my entire cmd/server/ directory from git. The entrypoint was never pushed. Coolify cloned an empty cmd/server/ folder and go build had nothing to compile. ...

May 18, 2026 · Deeka

Multiple Git Accounts: Managing Different Credentials

How to Push Your Local Git Repository to a Personal Account and Manage Multiple Configurations Managing Git repositories can sometimes get tricky, especially when you’re switching between accounts (like an organization and a personal account). This guide walks you through the process of pushing your local repository to a remote origin and ensuring the correct account credentials are used. Step 1: Initialize Git and Push to a Remote Repository 1. Create a Remote Repository Go to your Git hosting platform (e.g., GitHub, GitLab, Bitbucket). Create a new repository and copy its URL (e.g., https://github.com/username/repository.git). 2. Link Your Local Repo to the Remote If you’ve already initiated Git locally, link it to your remote repository using: ...

January 17, 2025 · Deeka

Cherry-Picking and Force Updating with Git: A Quick Guide

Learn how to cherry-pick multiple commits from one branch to another and force update the target branch, resolving conflicts by favoring the changes from the cherry-picked commits. Introduction Cherry-picking in Git allows you to apply specific commits from one branch to another. However, conflicts can arise, making the process tedious. This guide shows you how to automate cherry-picking and force update a branch while resolving conflicts by choosing changes from the cherry-picked commits. ...

July 28, 2024 · Deeka