GIT-TRIM(1)

πŸ“¦ version 0.4.4, in nixos 26.05, nixpkgs unstable

πŸ’… 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 when HEAD is about to be deleted [config: trim.detach]. protecting the main character HEAD, 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. 0 to 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 the merged, 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