Live data from Hacker News

Who needs Git when you have 1M context windows?

alexmolas.com

171–180 of 199 posts

Re: Who needs Git when you have 1M context windows?

#171

Earlier quoted context omitted.

I don't typically review commit by commit, but I do really appreciate having good commit messages when I look at the blame later on while reading code.

Which is just the PR message if you squash. To be clear, I'm not advocating for bad messages, but I am saying I don't worry about each commit and focus instead on the quality and presentation of the PR.

Definitely, but if you've made your PR with several different commits the message will contain all of the information for the whole PR, instead of just the message that pertains to the changes in that commit. It's not a HUGE deal, but it can make it harder to understand what the commit message is saying.

Re: Who needs Git when you have 1M context windows?

#172

"Who needs git when [..]" No matter how that sentence ends, I weep for our industry.

Really? After teaching/mentoring new devs and interns for the last two years at my job I definitely think there's plenty of space and opportunity for improvements on version control systems over git, large files and repos being one thing but primarily on user friendliness and accessibility where even existing ones like mercurial do a much nicer job in many ways.

Re: Who needs Git when you have 1M context windows?

#173

Earlier quoted context omitted.

It does the former by default, and the latter if you configure it.

I have heard of jj. I have tried jj, I love jj but I couldn't get myself towards using it. This itself seems to me the thing which will make me push towards jj. So if I am correct, you are telling me that I can have jj where I can then write anything in the project and it can sort of automatically record it to jj and afterwards by just learning some more about jj, I can then use that history to create a sane method f…

Happy to talk about it, for sure :)

> you are telling me that I can have jj where I can then write anything in the project and it can sort of automatically record it to jj

By default, yes, jj will automatically record things into commits. There's no staging area, so no git add, stuff like that. If you like that workflow, you can do it in jj too, but it's not a special feature like it is in git.

> and afterwards by just learning some more about jj, I can then use that history to create a sane method for me to create git commits and do other thing without having to worry too much.

Yep. jj makes it really easy to chop up history into whatever you'd like.

> I would love to use jj if it can make things less scary

One thing that jj has that makes it less scary is jj undo: this is an easy to use form of the stuff I'm talking about, where it just undoes the last change you made. This makes it really easy to try out jj commands, if it does something you don't like, you can just jj undo and things will go back to the way before. It's really nice for learning.

> Like what would be the command / exact workflow which I am asking in jj

jj gives you a ton of tools to do this, so you can do a lot of different things. However, if what you want is "I want to just add a ton of stuff and then break it up into smaller commits later," then you can just edit your files until you're good to go, and then run 'jj split' to break your current diff into two. You'd break off whatever you want to be in the first commit, and then run it again to break off whatever you'd want into the second commit, until you're done.

If you are worried about recovering deleted files, the best way to be sure would to be using the watchman integration: https://jj-vcs.github.io/jj/latest/config/#watchman this would ensure that when you delete the file, jj notices. Otherwise, if you added a file, and then deleted it, and never ran a jj comamnd in between, jj isn't going to notice.

Then, you'd run `jj evolog`, and find the id of the change right before you deleted the file. Let's pretend that's abc123. You can then use `jj restore` to bring it back:

  jj restore --from abc123 -- path/to/file
This says "I want to bring back the version of /path/to/file from abc123, and since that's the one before it was deleted, you'd get it back as you had it.

I tend to find myself not doing this a ton, because I prefer to make a ton of little changes up front, which just means running 'jj new' at any point i want to checkpoint things, and then later squashing them together in a way that makes sense. This makes this a bit easier, because you don't need to read through the whole evolog, you can just look at a parent change. But since this is about restoring something you didn't realize you deleted, this is the ultimate thing you'd have to do in the worst case.

Re: Who needs Git when you have 1M context windows?

#174
I find gemini 2.5 pro starts losing its shit around 50K tokens, using Roo Code. Between Roo's system prompt and my AGENTS.md there's probably about 10k used off the bat. So I have about 30-40k tokens to complete whatever task I assign it.

It's a workable limit but I really wish I could get more out of a single thread before it goes crazy. Does this match others' experience?

Re: Who needs Git when you have 1M context windows?

#175

Earlier quoted context omitted.

I have heard of jj. I have tried jj, I love jj but I couldn't get myself towards using it. This itself seems to me the thing which will make me push towards jj. So if I am correct, you are telling me that I can have jj where I can then write anything in the project and it can sort of automatically record it to jj and afterwards by just learning some more about jj, I can then use that history to create a sane method f…

Happy to talk about it, for sure :) > you are telling me that I can have jj where I can then write anything in the project and it can sort of automatically record it to jj By default, yes, jj will automatically record things into commits. There's no staging area, so no git add, stuff like that. If you like that workflow, you can do it in jj too, but it's not a special feature like it is in git. > and afterwards by ju…

I can second that `jj undo` is awesome!

Re: Who needs Git when you have 1M context windows?

#176

Don't take this as career advice! This is an amusing anecdote. But the only lesson to be learned is to commit early, commit often.

Emergency Building Fire Procedure: 1. Commit 2. Push 3. Evacuate

1. Commit with a full, detailed, well-formatted commit message, as always.

Re: Who needs Git when you have 1M context windows?

#177
post #10

I cannot wrap my head around the anecdote that opens the article: > Lately I’ve heard a lot of stories of AI accidentally deleting entire codebases or wiping production databases. I simply... I cannot. Someone let a poorly understood AI connected to prod, and it ignored instructions, deleted the database, and tried to hide it. "I will never use this AI again", says this person, but I think he's not going far enough:…

I mean everyone breaks prid at least once, ai is just one that doesn’t learnt from the mistake

To be clear, I'm not saying "don't make mistakes", because that's impossible.

I'm merely saying "don't play (automated) Russian roulette".

Post reply on HN