top | item 45766286

(no title)

Nashooo | 4 months ago

I mean. How can it be scary when you have git reflog.

discuss

order

steveklabnik|4 months ago

The reflog doesn't capture everything. jj's oplog does.

An example of something that the reflog isn't going to capture is a git reset --hard losing your unstaged changes, whereas the equivalent flow and commands in jj would allow you to get those contents back.

1718627440|4 months ago

The thing to keep in mind is that Git doesn't version the file system, it versions the index. This is because a file system guy like Torvalds knows that the file system is a shared resource and no program should think it can control its state. Therefore a Git repository doesn't consists out of all the files below a directory, it consists out of everything in the index.

Git does version everything that is in the repository and all these states occur in the reflog.

Nashooo|4 months ago

That makes sense