frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Splitting a Git Commit

https://blog.gnoack.org/post/git-history-split
20•signa11•3d ago

Comments

furkanturan•3d ago
I never thought about whether this was possible, but now that I know it is, I immediately see how useful it could be for my workflow.
jaltekruse•23m ago
I had a team that insisted on a linear history and was constantly rebasing things. This workflow strongly favors "just squash it all together" before a rebase to avoid re-resolving the same conflicts. This workflow often produces big patches that reviewers end up asking to be broken back up. This experience and a recommendation from my manager at the time made a good git GUI like sourcetree a daily driver for me. It's just second nature to review my own changes every time I stage files and quickly do a mix of staging whole files or "hunk-based", even allowing clicking to select specific lines within a hunk intuitively, rather than using the terminal UI and asking git to take a guess at splitting a hunk. I find a good git GUI invaluable, I have used sourcetree for years and love it. Unfortunately sourcetree isn't available for Linux, but I recently found SourceGit which seems to be a decent substitute.

Highly recommend trying a good GUI out, I think you would likely have similar ah-ha moments about workflow optimizations, and honestly I just cannot understand how people get by in git without a convenient way to visualize the commit tree (and yeah I know there is a decent command line treeview, but the context switching all the time in the terminal to go from viewing the tree or even the simple log to exit out and ask for commit contents just is so much more fussy and tedious).

esafak•17m ago
https://github.com/DetachHead/rebased
farlight•5m ago
git rerere will resolve repeated conflicts for you automatically, you just need to enable it.

https://git-scm.com/docs/git-rerere

ivanjermakov•31m ago
StackOverflow is really not great at handling questions for which the right answer changes over time. I guess it doesn't matter since SO is dead anyway: https://news.ycombinator.com/item?id=46482345
roelschroeven•29m ago
> P.S. The stack overflow question for splitting commits discusses the old and cumbersome approach. The 20th answer discusses the right approach but has a meagre 2 upvotes as of today, compared to 2656 for the older top answer with the cumbersome approach.

It now has 5 upvotes. A long way to go to 2656 but at least it's going in the right direction.

hotelsacher•23m ago
Still, it shows how incredibly broken the StackOverflow system is. It's completely normal for older answers to become outdated, but they still act like the old answers are laws of nature.
diath•7m ago
That's good to know, I'd usually go about it in a roundabout way: soft reset the commit then git add --patch to stage the hunks to split it into multiple commits.
matheusmoreira•3m ago
Today I learned about git history split. Thanks!!

Using the railway network as a flatbed scanner

https://philo.gay/linecam/
198•otherayden•3h ago•37 comments

Fixing a Bricked Framework Laptop

https://quantum5.ca/2026/08/16/fixing-bricked-amd-7040-series-framework-13-laptop-with-20-tools/
135•jp_sc•2h ago•58 comments

The Amazon Tax

https://seths.blog/2026/08/the-amazon-tax/
306•herbertl•2h ago•235 comments

Linux 7.3 improves performance when running out of vRAM

https://pixelcluster.dev/VRAM-Overcommit/
387•flaburgan•8h ago•152 comments

Python Polars Cheatsheet (based on our O'Reilly book)

https://opensource.posit.co/resources/cheatsheets/polars/
61•jeroenjanssens•2h ago•8 comments

One Oakland police officer made $490k in overtime

https://oaklandside.org/2026/01/29/oakland-police-overtime/
54•speckx•34m ago•58 comments

Teaching my kid to code with a modern MUD

https://tau.dev/2026/08/07/canon
126•andrewjanke•6d ago•41 comments

How I Under-Engineered My Book

https://chriskiehl.com/article/how-i-under-engineered-my-book
14•goostavos•20h ago•1 comments

Fairphone is now officially available in the United States

https://www.fairphone.com/nl/stories/the-fairphone-gen-6-is-all-about-giving-you-more
183•Vinnl•3h ago•89 comments

Babies born under sugar rationing grew into adults with lower cancer risk

https://theconversation.com/babies-born-under-sugar-rationing-grew-into-adults-with-lower-cancer-...
67•zeristor•1h ago•11 comments

Composable Tests

https://newsletter.kentbeck.com/p/composable-tests
33•vinipolicena•2h ago•24 comments

Splitting a Git Commit

https://blog.gnoack.org/post/git-history-split
20•signa11•3d ago•9 comments

Meta Files Patent for Facial Recognition, Automatic Recording of People

https://www.privacyguides.org/news/2026/08/17/meta-files-patent-for-facial-recognition-automatic-...
147•DeepLogin•3h ago•96 comments

Google buys crashed airline Spirit's data at auction

https://www.theregister.com/ai-and-ml/2026/08/18/google-buys-crashed-airline-spirits-data-at-auct...
407•pseudolus•5h ago•283 comments

How Bluesky draws its logo on screenshots

https://timmarinin.net/2026/bluesky-screenshots/
647•gavide•17h ago•405 comments

Code-native generation of highly programmable 3D assets (2026)

https://arxiv.org/abs/2607.22738
9•baigy•1h ago•3 comments

What Happens If OpenAI Dies?

https://www.wheresyoured.at/what-happens-if-openai-dies/
23•thelastgallon•26m ago•4 comments

Show HN: Shoehorn – Quantize any model down to run on your machine

https://notactuallytreyanastasio.github.io/shoehorn/
6•rhgraysonii•1h ago•2 comments

Baking a Model: A Metaphor for LLM Training

https://newsletter.kentbeck.com/p/baking-a-model
22•KentBeck•3d ago•1 comments

Quake Shareware, a CD-ROM just a little too full

https://fabiensanglard.net/quake_shareware_cd/index.html
446•shdon•17h ago•189 comments

Deus Ex creator Warren Spector is retiring from game development

https://www.videogameschronicle.com/news/its-just-not-as-much-fun-for-me-anymore-deus-ex-creator-...
83•danbolt•2h ago•54 comments

Finger: Social network that never died

https://en.andros.dev/blog/54572bc7/finger-the-1971-social-network-that-never-died/
111•andros•8h ago•36 comments

Israel creates fake think tank in likely attempt to dupe AI chatbots

https://responsiblestatecraft.org/israel-influence-chatgpt/
903•DeepLogin•19h ago•524 comments

Rethinking Database Programming

https://acadia.engineering/blog/rethinking-database-programming
168•honungsburk•8h ago•80 comments

GPT-5.6 Sol Pricing Cut by 50%

https://openrouter.ai/openai/gpt-5.6-sol
579•Topfi•18h ago•382 comments

The coolest anti-surveillance tools at Defcon [video]

https://www.youtube.com/watch?v=-2uAsJ5EPAw
19•neom•1h ago•0 comments

Claude writing a macOS driver for my obscure HP printer built only for Windows

https://twitter.com/kuberwastaken/status/2089377982536388964
96•porridgeraisin•3h ago•31 comments

The Size of the World Wide Web

https://www.worldwidewebsize.com/
3•1970-01-01•23h ago•0 comments

Fairphone 6 and PostmarketOS working main camera

https://catcrafts.net/posts/fairphone-6-postmarketos-working-main-camera
267•pizzaiolo•17h ago•67 comments

IBM Simon (1994): the original smartphone, explained in its own ad [video]

https://www.youtube.com/watch?v=xoTFywZpPcc
71•kls0e•2d ago•40 comments