Tooling posts | Laravel Git Blog

Tagged: Tooling

Tooling

Annotating Commits with git notes: Metadata Without Rewriting History

Some things belong on a commit but not in it: review links, benchmark results, the ticket nobody remembered to reference. git notes adds them after the fact, no rebase required.

21 October 2026 · 2 min read
Self-hosting Tooling

Backing Up Your Git Server So It Actually Restores

Every clone is a partial backup - but hooks, config and server state live outside the repo. Mirror, bundle, copy off-site, and rehearse the restore.

21 October 2026 · 2 min read
Tooling

Cherry-Picking: One Commit Without the Branch

Cherry-pick copies a single commit onto your branch and leaves the rest behind. Right for hotfixes across release branches, wrong as a sync strategy.

21 October 2026 · 2 min read
Tooling

Cleaning Untracked Files Without Regret

git clean deletes files no commit has ever held - there is no reflog for them. One dry-run flag and one .env warning make it safe.

21 October 2026 · 2 min read
Tooling

Deploy Keys and Machine Users: Giving CI Access Without Handing Over Yours

CI needs to read your repo; your personal SSH key should not be how. Deploy keys, machine users and fine-grained tokens compared, with the scoping rules that matter.

21 October 2026 · 3 min read
Tooling

Git Fetch vs Pull: What Your Pull Actually Does

git pull is git fetch plus a merge (or rebase). Knowing the two halves separately turns surprise merges into a choice you make on purpose.

21 October 2026 · 2 min read
Tooling Workflows

Git Bisect: Find the Commit That Broke It

The tests passed last week and fail now. Bisect turns 'somewhere in these 40 commits' into six test runs.

21 October 2026 · 2 min read
Tooling

Git LFS: When a Laravel Repo Needs It

Git holds text well and binaries badly. LFS moves the big files out of history — for the few assets that truly belong in the repo.

21 October 2026 · 1 min read
Tooling

Keeping a Fork in Sync With Upstream

A fork drifts the moment you create it. The two-remote setup - origin for you, upstream for the source - keeps it a weekend task, not a rescue job.

21 October 2026 · 2 min read
Tooling

Keeping Diffs Clean With .gitattributes

One config file tells Git how to treat each path: line endings, which diffs to hide, better hunk headers, and what stays out of downloads.

21 October 2026 · 2 min read
Tooling

Keeping Files Out of Git: ignore, exclude, and the Global File

Three places to ignore files - .gitignore, .git/info/exclude, and a global excludes file - plus how to untrack something that should never have been committed.

21 October 2026 · 2 min read
Tooling

Commit Your Lockfiles (and How to Survive Their Conflicts)

composer.lock and package-lock.json belong in the repo - they are the difference between one dependency set and forty. Conflicts in them are normal, and mechanical to fix.

21 October 2026 · 2 min read
Tooling

Branched Off the Wrong Branch? rebase --onto Moves It Cleanly

You built a feature on top of another feature, and now the first one merged - or will not. rebase --onto replants your commits where they belong, without the duplicate-commit mess.

21 October 2026 · 2 min read
Tooling

Reading Git History: The log Flags Worth Knowing

git log with no flags is a wall of text. Five flags turn it into a map you can actually use before a release or a review.

21 October 2026 · 2 min read
Tooling

Rerere: Stop Solving the Same Merge Conflict Twice

git rerere records how you resolve a conflict and replays it next time. One config flag turns repeated long-lived-branch conflicts into a non-event.

21 October 2026 · 2 min read
Tooling

Resolving Merge Conflicts Without Panic

A conflict is not an error, it is a question: two histories changed the same lines. Read both sides, decide, and finish the merge.

21 October 2026 · 2 min read
Tooling

Restoring a Deleted File From Git History

If the file was ever committed, it is recoverable - even after the commit that deleted it. Find the deletion, restore from the commit before.

21 October 2026 · 2 min read
Tooling

Reverting a Merge Commit (and Getting the Feature Back)

git revert -m 1 takes a whole feature out of main in one commit. The trap comes later, when re-merging the branch brings nothing back.

21 October 2026 · 2 min read
Tooling

Five git config Settings Worth Changing Today

Git's defaults are from another decade. Five one-line settings that prevent real mistakes: safer pulls, pruned remotes, remembered conflict resolutions and more.

21 October 2026 · 2 min read
Tooling

Shallow and Partial Clones: Faster CI Without Losing Your Mind

CI does not need ten years of history to run a test suite. How --depth, --filter and fetch-depth cut clone time, and the two gotchas that bite Laravel teams.

21 October 2026 · 2 min read
Tooling

Shortening Git With Aliases

git config --global alias turns the commands you type fifty times a day into two letters. A handful is useful; a hundred is a hobby.

21 October 2026 · 2 min read
Security Tooling

Signed Commits: When Your Team Should Bother

Signing proves a commit came from the key holder. Worth it for some repos, overhead for others. SSH keys make it cheap.

21 October 2026 · 1 min read
Tooling

SSH Keys for Git Access: Set Up Once, Push Forever

One ed25519 key, a config entry, and a quick test - how SSH access to your Git server works and how to fix it when it doesn't.

21 October 2026 · 2 min read
Tooling

Staging Changes in Hunks With git add -p

git add -p lets you stage part of a file instead of all of it - the difference between one messy commit and two clean ones.

21 October 2026 · 2 min read
Tooling

Stashing Changes in Git Without Losing Them

Stash is the drawer for work in progress: shelve it, switch context, bring it back. A few flags keep the drawer from becoming a junk pile.

21 October 2026 · 2 min read
Tooling

Submodules: When a Laravel Team Actually Needs One

A submodule pins another repo inside yours. For shared PHP code a Composer package is almost always the better answer - but not always.

21 October 2026 · 2 min read
Tooling

Switching Branches With git switch (and Why checkout Still Works)

Git 2.23 split checkout's many jobs into two clearer commands: switch for branches, restore for files. What changed, and what you can keep doing.

21 October 2026 · 2 min read
Tooling

Tagging Releases Properly in Git

Lightweight tags are bookmarks; annotated tags are records. Releases deserve the record: a message, a date, and a tagger.

21 October 2026 · 2 min read
Tooling Workflows

The Reflog: Undoing Almost Anything in Git

Reset too far, deleted the wrong branch, botched a rebase? The reflog remembers where HEAD has been, and that is usually enough.

21 October 2026 · 2 min read
Tooling

Interactive Rebase: Tidying Commits Before Review

Fixup the typo commits, reword the vague ones, drop the debug one. Your branch tells a clean story before anyone reads it.

21 October 2026 · 2 min read
Tooling Workflows

What Not to Commit in a Laravel Project

vendor, .env, caches and build output: the short list of what stays out of the repo, and the .gitignore that keeps it out.

21 October 2026 · 1 min read
Tooling Workflows

What to Do in a Detached HEAD

Detached HEAD sounds like an injury. It is just HEAD pointing at a commit instead of a branch - safe to look around, one command to keep any work.

21 October 2026 · 2 min read
Tooling Workflows

When to Reset, Restore or Revert

Three commands that all undo something in Git. The right one depends on what state you are undoing and whether anyone else has seen it.

21 October 2026 · 2 min read
Tooling Workflows

Why Git Blame Is Not About Blame

Blame answers 'why does this line exist', not 'who do I talk to about breaking it'. Used well it is the fastest route from a strange line to the decision behind it.

21 October 2026 · 2 min read
Tooling Workflows

Why You Should Force Push With --force-with-lease

Rewriting your own branch is normal after a rebase. --force-with-lease makes the push refuse to run if someone else touched the branch since your fetch.

21 October 2026 · 2 min read
Reviews Tooling

Reviewing Pull Requests With Git Worktrees

Run the PR next to your working copy instead of stashing and switching: git worktree, a second .env, and a throwaway database.

20 October 2026 · 1 min read
Workflows Tooling

Git Hooks That Earn Their Place on a Laravel Project

Three hooks that catch real problems: Pint before commit, tests before push, and a sane commit message check.

17 October 2026 · 1 min read

Our network