GIT-TRIM(1)
π NAME π
okay bestie, this is git-trim(1) from the General Commands Manual, and it's the page for the git-trim command β she automatically trims your tracking branches whose upstream branches are merged or stray. π
β¨ SYNOPSIS β¨
git-trim [FLAGS] [OPTIONS]
π© FLAGS π©
-h,--helpβ prints the help information, the classic βtell me what you doβ moment. β¨--no-updateβ do not update remotes[config: trim.update]. no remote refreshing, got it. π«Ά--no-confirmβ do not ask confirm[config: trim.confirm]. zero pause, straight to business. π--no-detachβ do not detach whenHEADis about to be deleted[config: trim.detach]. protecting the main characterHEAD, iconic. π--dry-runβ do not delete branches, show what branches will be deleted. a little preview era, no actual deleting. π₯
ποΈ OPTIONS ποΈ
-b,--bases=basesβ comma separated multiple names of branches. All the other branches are compared with the upstream branches of those branches.[default: branches that tracks `git symbolic-ref refs/remotes/*/HEAD`][config: trim.bases]
the default value is a branch that tracks git symbolic-ref refs/remotes/*/HEAD. They might not be reflected correctly when the HEAD branch of your remote repository is changed. You can see the changed HEAD branch name with git remote show <remote> and apply it to your local repository with git remote set-head <remote> --auto. π
-p,--protected=protectedβ comma separated multiple glob patterns (e.g.release-*,feature/*) of branches that should never be deleted.[config: trim.protected]protect the faves, periodt. π‘οΈ--update-interval=update_intervalβ prevents too frequent updates. Seconds between updates in seconds.0to disable.[default: 5][config: trim.updateInterval]yes, it says seconds twice, that's the vibe. β³-d,--delete=deleteβ comma separated values of<delete range>[:<remote name>]. Delete range is one of themerged, merged-local, merged-remote, stray, diverged, local, remote.:<remote name>is only necessary to a<delete range>when the range is applied to remote branches. You can use*as<remote name>to delete a range of branches from all remotes.[default : `merged:origin`][config: trim.delete]
merged implies merged-local,merged-remote.
merged-local will delete merged tracking local branches. merged-remote:<remote> will delete merged upstream branches from <remote>. stray will delete tracking local branches, which is not merged, but the upstream is gone. diverged:<remote> will delete merged tracking local branches, and their upstreams from <remote> even if the upstreams are not merged and diverged from local ones. local will delete non-tracking merged local branches. remote:<remote> will delete non-upstream merged remote tracking branches.
bestie, use with caution when you are using other than merged. It might lose changes, and even nuke repositories. ππ₯
πͺ EXIT STATUS πͺ
0β Successful program execution. slay, it worked. π1β Unsuccessful program execution. not the vibe. π101β The program panicked. full panic mode, absolutely not. π
cute little sign-off: this page is GIT-TRIM(1) in the General Commands Manual, and the footer just lands back on GIT-TRIM(1) β that's the source/version/date signal this page gives us, no extra numbers, no extra dates, just that. π«Άβ¨
π¦ where this page comes from
- nixos 26.05: git-trim 0.4.4
- nixpkgs unstable: git-trim 0.4.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms