Hacker News new | ask | show | jobs
by amelius 3589 days ago
Why not just use a filesystem which supports snapshots? It would allow you to go back without even invoking git.
4 comments

Why not just boil the ocean?
Using a better filesystem isn't that hard. Sure, on windows you have to set it up as a network drive, but that's a few minutes of effort.
Because a simple, but clever, alias that integrates with everyone's existing workflow is a lot easier?
1. calculating differences

2. merging two or more different branches

3. transporting code (publishing it)

3a. accepting somebody else's patches

4. descriptions of history points

4a. pointers to parent code trees (especially with tree merges)

5. history traversals (bisecting, among the others)

Not to mention that you need either administrative privileges for creating a snapshot or a special kind of filesystem that supports this for non-administrator. And sysadmin still needs to prepare such a filesystem for your $HOME.

What are you talking about? amelius is mentioning an alternative to the hacky "git undo", not an alternative to git. You put your git repo onto the filesystem.

As far as administration, most devs will have elevated rights or can use FUSE or something. We could talk about needing administrative privileges to install git, too, but it's pretty far removed from the central topic.

> amelius is mentioning an alternative to the hacky "git undo", not an alternative to git.

Ah, so I misunderstood. Still, changing the filesystem under $HOME (or whatever is the working directory) is more difficult than using some user-level tool.

That was called : ClearCase.