Git doesn't expose tools to easily search for these files, but I was able to recover the file I deleted by using libgit2 to enumerate all the blobs in the repo, search them for a known string, and dump the contents of matching blobs.
Who needs Git when you have 1M context windows?
151–160 of 199 posts
Re: Who needs Git when you have 1M context windows?
#152Earlier quoted context omitted.
What's the word? "Robot?"
Well, if the AI controls the computer and is how the user interacts with it, I was going to use "Operating System" myself. But that's two words, my bad.
Computer chips already use ai/machine learning to guess what the next instructions are going to be. You could have the kernel do similar guessing.
But I don't think those AI's would be the same ones that write love letters.
I think what we'll see is LLM's for people facing things, and more primitive machine learning for resource management (we already have it).
Sorry, I'm partially responding you and partially to this thread in general.
Re: Who needs Git when you have 1M context windows?
#153Earlier quoted context omitted.
Ah yes. Public shaming. The “beatings will continue until morale improves” strategy of code development. Next time, you may want to suggest an evergreen strategy where commits are tested before they’re merged.
‘Works on my local’
Re: Who needs Git when you have 1M context windows?
#154If it’s in the context window … it’s sitting around as plain text. I guess asking is easier than scrollback?
Re: Who needs Git when you have 1M context windows?
#155Earlier quoted context omitted.
Assuming you squash when you merge the PR (and if you don't, why not?), why even care? Do people actually look through the commit history to review a PR? When I review I'm just looking at the finished product.
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.
Re: Who needs Git when you have 1M context windows?
#156I had a similar anecdotal experience a few weeks ago. I was working on a blog entry in a VS Code window and I hadn't yet saved it to disk. Then I accidentally hit the close-window keyboard shortcut... and it was gone. The "open last closed window" feature didn't recover it. On a hunch, I ran some rg searches in my VS Code Library feature on fragments of text I could remember from what I had written... and it turned o…
Looking back, writing interrupt service routines[1] for DOS as a self-taught teenager has been massively helpful. Primarly because it taught me to save every other word or so, in case my ISR caused the machine to freeze. [1]: https://wiki.osdev.org/Interrupt_Service_Routines
Re: Who needs Git when you have 1M context windows?
#157Earlier quoted context omitted.
> If you want lessons learned put it in a wiki or a special branch. You already have the information in a commit. Moving that to another database like a wiki or markdown file is work and it is lossy. If you create branches to archive history you end up with branches that stick around indefinitely which I think most would feel is worse. > Main should be a clear, concise log of changes. No, that's what a changelog is f…
Commits aren't necessarily messy, but they're also not supposed to be necessarily clean. There's clearly two different work flows here. It seems some people treat every commit like it's its own little tidy PR, when others do not. For me, a commit is a place to save my WIP when I'm context switching, or to create a save point when I know my code works so that I can revert back to that if something goes awry during ref…
The workflow you're describing here is fine for staging or stashing or commits that you don't intend to publish. I'll sometimes commit something unfinished, then make changes and either stash those if it doesn't work out, or commit with --amend (and sometimes --patch) to make a single commit that is clean and coherent. The commits aren't always small, but they're meaningful and it's easier to do this along the way than at the very end when it's not so clear or easy to remember all the details from commits that you made days ago.
> It seems some people treat every commit like it's its own little tidy PR
Pull requests are not always "little". But I'm nitpicking.
It sounds like a big difference between the workflows is that you don't amend or stash anything locally along the way. I guess I find it easier and more valuable to edit and squash changes locally into commits before publishing them. Instead of at the very end as a single pull request. For me, I can easily document my process with good commit messages when everything is fresh in my mind.
The end result is that some commits can be pretty big. Sometimes there is no good opportunity to break them down along the way. That is part of the job. But the end result is that these problems concerning a messy history shouldn't be there. The commits I write should be written with the intent of being meaningful for those who might read it. And it's far easier to do that along the way then at the end when it's being merged. So it's difficult to understand some of the complaints people make when they say it's confusing or messy or whatever.
Even if requirements change along the way while the pull request is open, and more commits are added as a response. I've just never had a situation come up where I'm blaming code or something and looking back at the commit history and struggling to understand what was going on in a way where it would be more clear if it had been squashed. Because the commits are already clean and, again, it's just easier to do this along the way.
But again, I use `git commit --verbose --amend --patch` liberally to publish commits intentionally. And that's why it feels like a bit of busywork and violence when people advocate for squashing those.
Re: Who needs Git when you have 1M context windows?
#158Earlier quoted context omitted.
Looking back, writing interrupt service routines[1] for DOS as a self-taught teenager has been massively helpful. Primarly because it taught me to save every other word or so, in case my ISR caused the machine to freeze. [1]: https://wiki.osdev.org/Interrupt_Service_Routines
There's an option now in vscode to autosave every few seconds.
Re: Who needs Git when you have 1M context windows?
#159Earlier quoted context omitted.
Git is a distributed version control system. You can do whatever you like locally and it won't "pollute" anything. Just don't merge that stuff into shared branches. I automatically commit every time my editor (emacs) saves a file and I've been doing this for years (magit-wip). Nobody should be afraid of doing this!
Honest question - What DO you merge into shared branches? And, when your local needs to "catch up", don't you have to pull in those shared commits which conflict with your magit-wip commits because they touch the same code, but are different commit hashes?
Every so often this still means that devs working on a feature will need to rebase back on the latest version of the shared branch, but if your code is reasonably modular and your project management doesn't have people overlapping too much this shouldn't be terribly painful.
Re: Who needs Git when you have 1M context windows?
#160The interesting thing here is the common misconception that LLMs maintain internal state between sessions which obviously they don't. They don't have memory and they don't know about your files.