Hacker News new | ask | show | jobs
by skeppy 2168 days ago
What about a “git init-lite” option?

So many times I want to VC a directory but don’t care about commit messages, branching, or other jazz more suited to collaborative work.

With init-lite, all the power of Git is still there - and you can use any commit or command you want, but it’s default would be to simply VC for every file save. In other words, a file save IS a message-less commit.

3 comments

This exists: it's the git-annex assistant! You just have to configure the "annex.largefiles", because by default git-annex doesn't actually commit the content of the files, since it's designed to handle large binary files.

But if you set that option and run the Assistant, it'll auto-commit files when they change, and can even auto-sync them with other computers, cloud storage, Android devices, etc.

https://git-annex.branchable.com/assistant/

Sine decades I wish this would be a std. OS or FS feature!
Back in the stone age I worked at a place that used a VCS called ClearCase. It supported exactly this, you'd be able to append things like @revision or @branchname or @timestamp to file and directory names to access them.

Unfortunately, it required (IIRC) three full time people to administer the server. As for the client (my workstation), it required a proprietary kernel module which would panic about once a week. I'm told our license cost $1m/year (2001 dollars).

Indeed. I still miss VMS because of its automatic versioning, with version numbers being an explicit field of the pathname.
It's something that exists in macOS, but as far as I know applications have to explicitly choose to use it. Most applications that support it have a "File > Revert To > Browse All Versions..." command available. BBEdit -- as often the case -- has a more useful variant of it, which brings up a diff window with "Search > Find Differences > Compare Against Previous Version". (It actually lets you choose any recorded previous version.)
The good news is that git is extensible enough to support this use-case. You would need to wrap git with a tool/script that watches for file changes