I currently have a TUI addiction. Each time I want something to be easier, I open claude-code and ask for a TUI. Now I have a git worktree manager where I can add/rebase/delete. As TUI library I use Textual which claude handles quite well, especially as it can test-run quite some Python code.
Speaking of user friendliness of git UI. I am working on a revision control system that (ideally) should be as user friendly as Ctrl+S Ctrl+Z in most common cases. Spent almost a week on design docs, looking for feedback (so far it was very valuable, btw)
I've had essentially that - if a bit fancier to accept an optional argument as well as handle common "mainline" branch names - aliased as `git lint` for a while:
The main issue with `git branch --merged` is that if the repo enforces squash merges, it obviously won't work, because SHA of squash-merged commit in main != SHA of the original branch HEAD.
What tools are the best to do the equivalent but for squash-merged branches detections?
Note: this problem is harder than it seems to do safely, because e.g. I can have a branch `foo` locally that was squash-merged on remote, but before it happened, I might have added a few more commits locally and forgot to push. So naively deleting `foo` locally may make me lose data.
I also set mine up to run on `git checkout master` so that I don't really have to think about it too hard -- it just runs automagically. `gcm` has now become muscle memory for me.
IIRC, you can do git branch -D $(git branch) and git will refuse to delete your current branch. Kind of the lazy way. I never work off of master/main, and usually when I need to look at them I checkout the remote branches instead.
It won't delete unmerged branches by default. The line with the marker for the current branch throws an error but it does no harm. And I just run it with `develop` checked out. If I delete develop by accident I can recreate it from origin/develop.
Sometimes I intentionally delete develop if my develop branch is far behind the feature branch I'm on. If I don't and I have to switch to a really old develop and pull before merging in my feature branch, it creates unnecessary churn on my files and makes my IDE waste time trying to build the obsolete stuff. And depending how obsolete it is and what files have changed, it can be disruptive to the IDE.
I have a cleanup command that integrates with fzf. It pre selects every merged branch, so I can just hit return to delete them all. But it gives me the opportunity to deselect to preserve any branches if I want. It also prunes any remote branches
I've got a few aliases that integrate with fzf like an interactive cherry pick (choose branch, choose 1 or more commits), or a branch selector with a preview panel showing commits to the side. Super useful
The article also mentions that master has changed to main mostly, but some places use develop and other names as their primary branch. For that reason I always use a git config variable to reference such branches. In my global git config it's main. Then I override where necessary in any repo's local config eg here's an update command that updates primary and rebases the current branch on top:
# switch to primary branch, pull, switch back, rebase
update = !"git switch ${1:-$(git config user.primaryBranch)}; git pull; git switch -; git rebase -;"
If something this natural requires several lines of bash, something is just not right. Maybe branches should go sorted by default, either chronologically or topologically? git's LoC budget is 20x LevelDBs or 30% of PostgreSQL or 3 SQLites. It must be able to do these things out of the box, isn't it?
I keep a command `git-remove-merged`, which uses `git ls-remote` to see if the branch is set up to track a remote branch, and if it is then whether the remote branch still exists. On the assumption that branches which have had remote tracking but no longer do are either merged or defunct.
The Git command is whatever, pretty basic and stuff i have done forever but i am glad i clicked because ended up going down the rabbithole of the Wikileaks it was sourced from
Some unhinged stuff there. Like the CIA having a project called "Fine Dining" which was basically a catalog of apps that could be put on a USB drive to hide malicious code.
A case officer picks a cover app from a list of 24: VLC, Chrome, Notepad++, 2048, Breakout. Plug in the USB. Cover app opens. Exfiltration runs silently behind it. Target walks back in and the officer can just say "oh was just playing some games on this machine"
Score Breakdown
-0.05
PreamblePreamble
Low
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Preamble concepts not directly engaged; technical content is neutral to human rights; minor privacy tracking signals present
+0.05
Article 1Freedom, Equality, Brotherhood
Low
Editorial
ND
Structural
+0.05
SETL
ND
Combined
ND
Context Modifier
ND
No direct engagement; open publication is mildly consistent with equal dignity principles
0.00
Article 2Non-Discrimination
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
No discrimination signals observable; technically neutral content
0.00
Article 3Life, Liberty, Security
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Right to life/security not engaged in technical tutorial
0.00
Article 4No Slavery
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Slavery/servitude not engaged
0.00
Article 5No Torture
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Torture/degrading treatment not engaged
0.00
Article 6Legal Personhood
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Right to recognition before law not engaged
0.00
Article 7Equality Before Law
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Equal protection before law not engaged
0.00
Article 8Right to Remedy
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Remedy for violation not engaged
0.00
Article 9No Arbitrary Detention
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Arbitrary arrest/detention not engaged
0.00
Article 10Fair Hearing
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Fair trial rights not engaged
0.00
Article 11Presumption of Innocence
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Criminal law principles not engaged
-0.47
Article 12Privacy
Medium Practice
Editorial
-0.20
Structural
-0.25
SETL
+0.11
Combined
ND
Context Modifier
ND
Content discusses privacy-adjacent technical topics; site structure includes Google Analytics tracking without explicit privacy notice or consent mechanism observable. Editorial reference to leaked CIA documents is journalistic but structural tracking signals negative lean on Article 12 (privacy/correspondence)
0.00
Article 13Freedom of Movement
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Freedom of movement not engaged
0.00
Article 14Asylum
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Asylum/persecution not engaged
0.00
Article 15Nationality
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Nationality not engaged
0.00
Article 16Marriage & Family
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Marriage/family rights not engaged
0.00
Article 17Property
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Property rights not engaged
0.00
Article 18Freedom of Thought
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Freedom of thought/conscience/religion not engaged
+0.37
Article 19Freedom of Expression
Medium Advocacy Framing
Editorial
+0.35
Structural
+0.15
SETL
+0.26
Combined
ND
Context Modifier
ND
Editorial positive: Author freely expresses technical knowledge and references leaked documents (WikiLeaks Vault7). Structural positive: Content freely accessible without registration/paywall, supporting information freedom. Framing neutral/positive regarding information access
+0.05
Article 20Assembly & Association
Low
Editorial
ND
Structural
+0.05
SETL
ND
Combined
ND
Context Modifier
ND
No restrictions on assembly observable; open forum access present
0.00
Article 21Political Participation
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Political participation not engaged
0.00
Article 22Social Security
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Social security/welfare not engaged
0.00
Article 23Work & Equal Pay
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Work/employment rights not engaged
0.00
Article 24Rest & Leisure
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Rest/leisure not engaged
0.00
Article 25Standard of Living
Editorial
ND
Structural
0.00
SETL
ND
Combined
ND
Context Modifier
ND
Adequate standard of living not engaged
+0.13
Article 26Education
Medium Advocacy
Editorial
+0.15
Structural
+0.10
SETL
+0.09
Combined
ND
Context Modifier
ND
Editorial positive: Author shares technical knowledge openly and educationally. Content facilitates learning/skill development in software development. Structural positive: Free access to technical education materials supports educational access
+0.23
Article 27Cultural Participation
Medium Advocacy Framing
Editorial
+0.20
Structural
+0.15
SETL
+0.10
Combined
ND
Context Modifier
ND
Editorial positive: Author participates in cultural/intellectual production (technical writing). Structural positive: Free sharing of intellectual work; attribution clear (author identified). Framing supports participation in cultural/technical commons