News for hackers. Stuff that matters.
Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @09:52AM (#21980401)
Are you saying that with knowledge of what "git reflog" is? I suspect not. I'd really need to see a sequence of commands that removes committed state from the repo to buy this. If you try to produce it, bear in mind the first thing I'm going to do is run "git reflog" on the result, so if you find your committed state is still there, then I'm going to say it's still saved.

(That's not a git thing. I don't really even want some sort of hypothetical source control system that literally tracks every change I make. It's technically conceivable and should be practical to what would at least be considered a "medium sized" project in the git world, but I'd just be buried in the literally thousands of "commits" I'd be producing an hour. Failing that sort of feature, a source control system can't help but "lose" things not actually put into it.)

Re:Is Git Irreplaceable? (2019) by mannykannot on Tuesday January 07, 2020 @10:57AM (#21981133)
As I am not familiar with the details of reflog (I don't recall ever using it) I took a look at the article. I wasn't long until I reached what looks like a caveat: "This command has to be executed in the repository that had the lost branch. If you consider the remote repository situation, then you have to execute the reflog command on the developer’s machine who had the branch." Joe, who works on another continent, quit last week and his computer was a VM...

OK, so we have backups of his VM and we can recreate a clone of it, but will that be satisfactory? Are there any issues with hardware MAC addresses or CPU ids? How far down the rabbit hole of git minutiae do you have to go before you are confident that you can do all basic source-control operations safely?

Re:Is Git Irreplaceable? (2019) by jerf on Tuesday January 07, 2020 @12:11PM (#21981951)
No source control system can solve the problem of not having things it was never given.
Re:Is Git Irreplaceable? (2019) by gallier2 on Tuesday January 07, 2020 @12:59PM (#21982586)
git log --reflog --all

is the more important imo than

git reflog