Live data from Hacker News

Dura is a background process that watches your Git repositories

github.com

61–70 of 207 posts

Re: Dura is a background process that watches your Git repositories

#61

This feature is built-in to all the JetBrains IDEs. Right-click your project, open Local History, and you can diff any file at any two points in time. That's saved my bacon more than once.

VS Code has a local history extension: https://marketplace.visualstudio.com/items?itemName=xyz.loca...

Re: Dura is a background process that watches your Git repositories

#62
post #10

Along similar lines, I've adopted a hyper-frequent commit pattern in git. I do a bunch of meaningless micro-commits as I'm making progress, and then rewrite them all into one or two meanginful commits once I've reached a working state of whatever I was trying to do. I find it's helpful for not losing work / easily backing up if as I'm going along I realize I want to change approach. (For the micro commit I have a git…

I do something similar, but with larger intermediate commits than yours and more meaningful messages. Then at the end, I do an interactive rebase, squash the ones I don't care about, and reword the final commit message based on the hints I left myself in the squashed ones.

Re: Dura is a background process that watches your Git repositories

#64

Cool tool! It's kind of insane to that in 2022 were still dealing with "save early, save often." Our tools are so antiquated. Storage is cheap and computers are fast, every keystroke should be persisted somewhere I can recover from rather than having to manually save and commit works in progress.

You mean like a keylogger that saves everything to some third party?

Re: Dura is a background process that watches your Git repositories

#65

Earlier quoted context omitted.

I've tried that as well. For me it was really difficult as I use the current changes quite a lot, and it makes it a lot more difficult to grasp the work I've done so far without having a meaningful change set.

I keep a draft PR open to keep track of this. Not has nice as vs-codes diff tool though.

You can still use VS Code's diff if you have the GitHub Pull Requests extension: https://marketplace.visualstudio.com/items?itemName=GitHub.v...

Re: Dura is a background process that watches your Git repositories

#66
post #10

Along similar lines, I've adopted a hyper-frequent commit pattern in git. I do a bunch of meaningless micro-commits as I'm making progress, and then rewrite them all into one or two meanginful commits once I've reached a working state of whatever I was trying to do. I find it's helpful for not losing work / easily backing up if as I'm going along I realize I want to change approach. (For the micro commit I have a git…

What you're describing is how git should be used. I would add it's important to push your branch to the remote just in case something happens to the local copy. I tend to squash/rebase to get the same type of results, but I can't imagine not saving work regularly or being concerned with the commit history while I'm actively working.

Re: Dura is a background process that watches your Git repositories

#67
post #53

As a sidenote - “dura” is a common and fairly rude Russian word for “fool” or “imbecile” as applied to women. Perhaps it was intended, but I can’t quite make a connection.

And "git" is English slang for similar.

Dura is also an anatomical term for the tissue encasing the brain.

Re: Dura is a background process that watches your Git repositories

#68
post #53

As a sidenote - “dura” is a common and fairly rude Russian word for “fool” or “imbecile” as applied to women. Perhaps it was intended, but I can’t quite make a connection.

It’s also the name for the protective membrane that surrounds your brain!

Re: Dura is a background process that watches your Git repositories

#69
I built a similar tool a couple of years ago here: https://github.com/google/git-sync-changes

Both save uncommitted changes in a hidden ref.

Based on the README, the differences seem to be:

1. dura runs as a daemon while git-sync-changes is a one shot execution.

2. dura saves locally, while git-sync-changes syncs with a remote repo.

3. dura only does the save and the restore is manual, whereas git-sync-changes does both steps automatically.

I’m glad to see more people exploring this space. I think there’s a lot of untapped potential in tracking pending changes similarly to how we track committed changes.

Re: Dura is a background process that watches your Git repositories

#70
post #22

Emacs's autosave is quite excellent at recovering my work when my computer crashes. M-x recover-this-file https://www.emacswiki.org/emacs/AutoSave

magit has a mode, magit-wip-mode, that can do what dura does (but it only works if you make changes with Emacs).

https://magit.vc/manual/magit/Wip-Modes.html

Post reply on HN