Knowledge Base

Git Developer Guides

Practical command line solutions and native Mac workflows for common Git challenges.

How to check unpushed commits across all Git repos on macOS

Find every local branch with unpushed commits across all your Mac's repositories before shutting down or switching machines.

How to find all Git repositories with uncommitted changes on Mac

Find all dirty Git working trees across your developer directories using CLI one-liners or the native macOS GitMon menu bar monitor.

How to find and delete stale local Git branches

Safely clean up merged and abandoned local Git branches that clutter your git branch list and shell tab completion.

Git detached HEAD: what it means and how to fix it

Understand why Git enters a detached HEAD state after checking out a commit or rebase, how to keep your changes, or how to return to your branch.

How to find and list all Git repositories on a Mac

Fast terminal commands and tools to discover and inventory every Git repository on your macOS machine.

Pre-flight checklist: Find all uncommitted changes before switching Macs

Never leave work stranded locally when shutting down or switching between a desktop and laptop. A complete checklist for developers.

Git ahead and behind remote: what it means and how to resolve it

What ahead and behind commit counts mean in Git, why branches diverge, and how to safely sync them.

How to git pull or fetch every repo in a folder at once

Fetch or pull every Git repository in a folder with one shell loop, without clobbering repos that have uncommitted work or diverged branches.

How to find forgotten Git stashes across all repos on a Mac

List old Git stashes in one repository or across every repo on your Mac, see what is in them, and recover a stash you dropped by mistake.

Git says "Your branch is up to date" but the remote has new commits

Why git status compares against your last fetch, why git status -uno does not help, and how to check the remote without changing anything.

Git push says "Everything up-to-date" but your branch is ahead

Five reasons push and status disagree, from a mismatched upstream to a detached HEAD, with the command that tells them apart.

fatal: Need to specify how to reconcile divergent branches

What git pull's divergent-branches hint means, how to see the commits on each side, and when to rebase, merge, fast-forward only, or reset to the remote.

error: The branch 'x' is not fully merged

What git branch -d actually checks, why squash and rebase merges fail it, how to confirm with git cherry, and when git branch -D is safe.

Remote branch deleted but still shows locally

Why git branch -r keeps a branch deleted on GitHub, how git fetch --prune and fetch.prune fix it, and how to find and delete local branches marked [gone].

error: Your local changes to the following files would be overwritten by checkout

Why git switch refuses to change branches over a modified file, when to stash, commit, checkout -m or restore, and what a stash pop conflict looks like.

fatal: The current branch has no upstream branch

Why git push refuses a new branch, when to use push -u, push.autoSetupRemote or set-upstream-to, and why git status never mentions it.

git push rejected: Updates were rejected because the remote contains work that you do not have locally

What (fetch first) and (non-fast-forward) mean, how to pull with rebase or merge and push again, and why --force-with-lease beats --force.

Reading git status without running git

How the index, refs and pack files are read directly, and how the index's cache-tree extension proves nothing is staged without reading a single tree.