frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

The Git history command deserves more attention

https://lalitm.com/post/git-history/
71•turbocon•1h ago•35 comments

Success may not matter if you aren't doing what you love

https://12gramsofcarbon.com/p/founders-guide-success-may-not-matter
39•theahura•2h ago•9 comments

Building and shipping Mac and iOS apps without opening Xcode

https://scottwillsey.com/building-and-shipping-mac-and-ios-apps-without-ever-opening-xcode/
329•speckx•8h ago•144 comments

Fundamentals of Wireless Communication

https://web.stanford.edu/~dntse/wireless_book.html
8•teleforce•28m ago•1 comments

Apple's new SpeechAnalyzer API, benchmarked against Whisper and its predecessor

https://get-inscribe.com/blog/apple-speech-api-benchmark.html
466•get-inscribe•10h ago•185 comments

An Englishwoman who sketched India before photography took hold

https://www.bbc.com/news/articles/cm2drrv6q54o
59•1659447091•3h ago•13 comments

MorphoHDL: A minimalistic language for growing circuits

https://paradigms-of-intelligence.github.io/morpho/
16•jacktang•1h ago•1 comments

World-First 'Super Alloy' Could Transform the Way Metals Are Made

https://www.sciencealert.com/world-first-super-alloy-could-transform-the-way-metals-are-made
15•tejohnso•4d ago•5 comments

Turn your singing voice into printable notes (in the browser)

https://om-intelligence.ch/projects/vocal-notation/vocal-notation.html
19•busssard•2h ago•9 comments

The infinite scroll may become endangered if controversial Calif. law passes

https://www.sfgate.com/politics/article/meta-social-media-teenagers-22337724.php
95•Stratoscope•7h ago•157 comments

Show HN: YouTube Guitar Tab Parser

https://github.com/marcelpanse/youtube-guitar-tab-parser
77•neogenix•6h ago•47 comments

Show HN: Sx 2.0 – Share AI skills with your team through a Dropbox folder

https://sleuth-io.github.io/sx/2026/07/10/your-dropbox-is-now-a-skill-server.html
18•detkin•3h ago•14 comments

Building Food Metadata with LLM Juries

https://careersatdoordash.com/blog/building-food-metadata-with-llm-juries-context-optimization-mu...
6•tie-in•56m ago•0 comments

The art and engineering of Sega CD Silpheed

https://fabiensanglard.net/silpheed/index.html
231•ibobev•11h ago•49 comments

Is x86 ready to ACE it?

https://chipsandcheese.com/p/is-x86-ready-to-ace-it
7•mfiguiere•1h ago•0 comments

The Economics of Recursive Self-Improvement [pdf]

https://elasticity.institute/rsi-paper.pdf
5•apsec112•1h ago•0 comments

SalesPatriot (YC W25) Is Hiring Full Stack Engineers (SF)

https://jobs.ashbyhq.com/SalesPatriot/df223727-5781-433e-bc75-2aa5bf8dc8d7
1•maciejSz•5h ago

What did SFFA vs. Harvard reveal about admissions?

https://sorting-machine.pages.dev/
21•StrageMusik•2h ago•25 comments

Linux on the Sega 32X. Who needs hardware synchronization primitives anyway?

https://cakehonolulu.github.io/linux-on-32x/
103•cakehonolulu•8h ago•22 comments

Show HN: Hackney – Compare Uber, Lyft, Waymo, and Robotaxi Prices

https://hackney.app/
25•griffinli•11h ago•18 comments

Satellite Tracker – Live Map of Starlink and 30k Satellites

https://satellitemap.space/
3•rolph•42m ago•0 comments

Show HN: Jacquard, a programming language for AI-written, human-reviewed code

https://github.com/jbwinters/jacquard-lang
55•jbwinters•10h ago•22 comments

The Difference Between Watercolor and Gouache Paints

https://www.jetpens.com/blog/The-Difference-Between-Watercolor-and-Gouache-Paints/pt/963
19•ynac•3d ago•2 comments

TFTP Honey Pot Results

https://bruceediger.com/posts/tftp-honeypot-results/
59•speckx•7h ago•27 comments

Show HN: I implemented a neural network in SQL

https://github.com/xqlsystems/xarray-sql/blob/claude/xarray-sql-mnist-demo/benchmarks/nn.py
62•alxmrs•6h ago•13 comments

Show HN: MemStitch – Zero-copy context bridging for vLLM (25x TTFT speedup)

https://github.com/DaqulaLin/MemStitch
6•daqulalin•1h ago•0 comments

Ancient Roman Board Game

https://ludus-coriovalli.web.app/
94•nobody9999•4d ago•37 comments

Telegram's t.me domain has been suspended

https://www.whois.com/whois/t.me
267•Tiberium•6h ago•189 comments

ESBMC-Arduino: Closing the Deployment Gap for Formal Verification

https://arxiv.org/abs/2607.08550
5•Jimmc414•1h ago•1 comments

Samsung Health app threatens data deletion if users opt out AI training

https://neow.in/cWsyMTV3
284•bundie•6h ago•70 comments
Open in hackernews

The Git history command deserves more attention

https://lalitm.com/post/git-history/
71•turbocon•1h ago

Comments

nine_k•1h ago
In short, newer versions of git implemented three really frequent use cases of `git rebase --interactive` as separate lower-friction commands. Apparently they only work when there are no conflicts.
BobbyTables2•1h ago
Wonder if the history command is all that useful.

I prefer the interactive rebase and use it frequently.

Would much rather “visually” move commits around than accidentally aim “git history” at an orphaned commit hash no longer in my local branch.

skydhash•1h ago
> Working with lots of changes in parallel on git can be painful. You end up juggling branches and commits, and running scary rebase -i commands that can leave your tree in a half-broken state if you so much as sneeze.

I think that only happens when you work on code as text files (i.e character streams) instead of code (i.e structured content with meaning). Like you have commit A and commit B that is in conflict, you should be glad because that's a rough signal that the intent of A and B differs. Your goal should be to think about how to compose A and B so that both intent survives (unless one supersedes the other). Which means you should be at least familiar with A and B.

The issue I found with people that fears conflict is that they often don't understand either A or B (or both). So they are a bad candidate to actually do the operation. It's not a matter of git's cli interface, it's a matter of codebase comprehension and how well you're familiar with the changes in question.

thfuran•46m ago
Git is the one treating code like a text file instead of code.
UnfitFootprint•40m ago
I pull out difftastic when it’s all too hard for this. Diffs based off tree sitter
skydhash•16m ago
Git store whole files. The diff and the merge algorithm works by line by default, but that's because line is a rough unit of code (statement, expression, and definition happens mostly within one line).
bulatb•41m ago
I can fully understand a conflict, know it's coming, and fear it anyway because I'll have to deal with Git being Git to fix it.
seba_dos1•32m ago
Such as?

When you merge a commit in that changed a file that has been already changed since the common ancestor, Git runs a tool of your choice on this file. If the tool fails, it marks the file as needing a merge and doesn't let you commit it until you unmark it to confirm that you have merged it manually. In case of octopus merges, it will just abort early. That's basically its whole behavior when it comes to conflicts.

bulatb•15m ago
Such as moving down a fixup during interactive rebase when it's going to conflict with parents, or I've added more commits mid-rebase, or the rebase started in a tool and now I need to think about the tool's command and understand how many times the rebase point is view is backwards to interpret which is "ours" and which is "theirs" and whether it's the tool, my editor, or my own experience I should ignore because it's going to mislead me.

None of that word salad should matter, but it does. Git will ruin everything with glee and there is always an excuse for why that's fine and it's the user's fault.

jolmg•46m ago
> scary rebase -i commands that can leave your tree in a half-broken state if you so much as sneeze

`git rebase --abort` exists. One can also set a tag or something before doing the rebase, do whatever, then `git reset --hard $set_tag` to go back. Nothing to be scared of. Not like the prior state is lost.

catlifeonmars•42m ago
Do you use git reflog?
jolmg•31m ago
One can also use that, or just `git log -n1` and taking note of the commit hash. So many options.
rmunn•18m ago
I have so many branches named `temp` or `before-rebase` for exactly that reason; I'm using them effectively as tags, but branches can be moved around with less ceremony than tags (since tags are designed to be for things like v1.2.3, placed once and then almost never moved again), so I usually just do `git branch before-rebase/some-feature` before running a big `rebase -i`.

I've almost never needed to run `get reset before-rebase`. But I have often done `git log -p before-rebase` and compared that to the post-rebase state of the branch, to ensure that the merge-conflict resolution(s) that came up during the rebase haven't accidentally introduced an unintended change.

jolmg•7m ago
> but branches can be moved around with less ceremony than tags

`git tag -f` to move a tag.

Personally, I just do `git show` when I'm feeling cautious, but I can generally just scroll up to find the last `git commit` I did with the hash in the output. `git reflog` should also have record of it, so everything else is kind of extra.

paularmstrong•44m ago
`git history split` is really going to help me help juniors break up their large PRs into smaller more concise changes. If only it had the option to split an entire branch in two easily.
catlifeonmars•43m ago
What does it mean to split a branch in two?
rmunn•26m ago
Probably to take a series of commits and decide "this one goes on branch A, this one on branch B", e.g. if you intermingled fixing bug A and B in the same branch, you could more easily go through and assign each commit to a new branch.

The existing workflow for that would be (there are several possible workflows, but this is what I would do):

  git checkout intermingled-branch
  git branch bugfix-A
  git branch bugfix-B
  git checkout bugfix-A
  git rebase -i
  # Edit the file, keep commits that fix bug A, drop commits that fix bug B
  git push origin bugfix-A:bugfix-A
  git checkout bugfix-B
  git rebase -i
  # Edit the file, keep commits that fix bug B, drop commits that fix bug A
  git push origin bugfix-B:bugfix-B
hahahaa•35m ago
I like to be like an accountant. No editing history. Create a new "journal entry" (i.e. commit) to fix.
what•25m ago
You probably shouldn’t be committing things that are broken…
moezd•14m ago
With tools like GitHub Actions and some added constraints, it's not always possible. You literally need a commit to trigger the CI workflow and it starts to trash your branch. Besides, aren't we all familiar with git commit -m "typo"?
seba_dos1•20m ago
Commit graph is just a data structure. Sometimes it represents a "history", sometimes other things.

Personally, I like it when project's repository represents the history of the project rather than the history of random things developers do on their machines, but you do you.

bentt•34m ago
Granted, I have a perspective of a game dev, but this kind of repo defiling just gives me the willies. IMO instead of finding a common ancestor and altering it, just make the desired change upstream and merge it to where it’s needed. If you can’t do that then you have already made a deal with the devil and might reconsider your approach. KISS
shepmaster•29m ago
> That last part goes further than git rebase --update-refs, which only moves refs sitting inside the range you’re actively rebasing. git history instead finds and rewrites every local branch descended from the commit (while also having an option to limit it to only the current branch).

I'm reading that to mean that when I use `git rebase --update-refs` in this situation, where I've currently checked out `D` and update `B` to `B'`:

  A ──► B ──► C ──► D  
        │              
        └───► E        
I'll end up with this state, where `E` remains untouched?

  A ──► B' ─► C' ─► D'  
  │                   
  └───► B ──► E        
(EDIT: Originally I had `E` point to `B'`, which doesn't make sense)

If I use `git history fixup`, it would also update `E` and end up with this?

  A ──► B' ─► C' ─► D'  
        │              
        └───► E'        
If that's the case, is there a way to get `git rebase` to have the same behavior? I've got decades of `git rebase` burned into my fingers at this point.
jolmg•27m ago
> I'll end up with this state, where `E` remains untouched?

Can't, because a commit's hash takes into account the parent hashes.

Haven't used --update-refs, but reading it, it should result in your third graph. So,

> is there a way to get `git rebase` to have the same behavior?

is already the case.

rmunn•24m ago
Unless E remained untouched because it was not rewritten, and ended up staying parented on B instead of getting reparented onto B'.

Which is usually not what you want; most of the time you want E', which is E reparented onto B'. But sometimes you want E to remain untouched and stay parented on the original B. Depends on the situation.

jolmg•23m ago
nativeit•13m ago
I don’t consider myself a coder or programmer, but learning git was like an organizational superpower for my particular brain wiring. I use it for websites, design projects, electronics engineering, music composition, personal knowledge bases, remote administration scripts, config management, snippets, so many applications and so many features for one system. It’s not always perfect, but I tell everyone I work with they should learn it.
seba_dos1•9m ago
There's nothing "backwards" in "rebase point of view". It's just automated cherry-picking - it's like applying patches, it's as forwards as it gets. People who think it's "backwards" usually just have holes in their mental model of the repository. And yes, I find tools doing what you're asking them to do to be rather fine. In fact, Git makes it easy to notice when you're adding commits mid-rebase, which is something I often do intentionally, as it tells you what the HEAD is (and even shows a detailed state of the in-progress rebase) while authoring the commit message.
Exactly, but the second graph where untouched E is reparented to B' is not something that git would allow.
shepmaster•20m ago
Ah, good catch. That's more of a graphic issue and not what I was trying to express. Updated the OP.
jolmg•15m ago
In that case,

> when I use `git rebase --update-refs` [...] I'll end up with this state, where `E` remains untouched?

would be backwards. The second graph would be what you'd get if you don't use --update-refs. The third graph would be what you'd get when you do use it. At least, according to my reading:

> --update-refs Automatically force-update any branches that point to commits that are being rebased. Any branches that are checked out in a worktree are not updated in this way.

shepmaster•8m ago
> Haven't used --update-refs, but reading it, it should result in your third graph.

I don't think it does. I tried locally:

  mkdir test; cd test; git init
  touch a; git add a; git commit -m 'a'
  touch b; git add b; git commit -m 'b'
  touch c; git add c; git commit -m 'c'
  git checkout -b branched-feature HEAD~
  touch d; git add d; git commit -m 'd'
  git checkout main
  echo 'change' > b; git add b; git commit -m 'fix b'
  git rebase -i --root --update-refs
And ended up with this graph (`git log --graph --all`)

  * commit (HEAD -> main)
  |
  |     c
  |
  * commit 
  |
  |     b
  |
  | * commit (branched-feature)
  | |
  | |     d
  | |
  | * commit
  |/  
  |       b
  |
  * commit 
  
        a
Replacing the `git commit -m 'fix b'; git rebase -i --root --update-refs` with `git history fixup HEAD~` produces what I'd like:

  * commit (branched-feature)
  |
  |     d
  |
  | * commit (HEAD -> main)
  |/
  |       c
  |
  * commit
  |
  |     b
  |
  * commit 
  
        a
jolmg•4m ago
Huh.. That's a shame :(. Maybe what it refers to is if you had a branch on B rather than D, it might update that.
lelandfe•26m ago
See: https://blog.hot-coffee.dev/en/blog/git_update_refs/
shepmaster•17m ago
I'm not sure that answers my question. That shows a linear set of branches (my-feature-v3 depends on my-feature-v2 depends on my-feature-v1 depends on main). I'm asking about the case where two or more branches fork from a common ancestor and you want to fix the common ancestor.