Subversion 1.8.0 released
Subversion 1.8.0 released
Posted Jun 23, 2013 2:03 UTC (Sun) by jimparis (guest, #38647)In reply to: Subversion 1.8.0 released by mathstuf
Parent article: Subversion 1.8.0 released
"git checkout" is a particularly easy to way lose data.While true, it will fail of git can't reapply your local changes.
No, I'm referring to running git checkout file when file has unstaged changes. Git irrevocably clobbers file with the original copy without confirmation. And that is made significantly worse by the fact that git checkout branch is a common non-destructive operation. It means that a small brain fart while trying to do something non-destructive (checkout a branch) can easily destroy data (checkout a file).
Posted Jun 23, 2013 4:09 UTC (Sun)
by jedbrown (subscriber, #49919)
[Link] (5 responses)
Posted Jun 23, 2013 6:15 UTC (Sun)
by dlang (guest, #313)
[Link] (3 responses)
picking on git for doing so seems odd.
Posted Jun 23, 2013 17:21 UTC (Sun)
by jimparis (guest, #38647)
[Link]
picking on git for doing so seems odd.
Say you have two branches with an identical file. You edit the file,
then realize you wanted to commit to the other branch. So you might
do this, which is fine:
Posted Jun 23, 2013 22:23 UTC (Sun)
by marcH (subscriber, #57642)
[Link]
None. This is about the one that makes it the easiest.
Posted Jun 24, 2013 9:38 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link]
"git checkout" is really one of the dumbest ideas in Git.
Posted Jun 23, 2013 10:29 UTC (Sun)
by dark (guest, #8483)
[Link]
Subversion 1.8.0 released
Subversion 1.8.0 released
Subversion 1.8.0 released
what version control system won't overwrite files if you do a checkout?
I'm picking on git because git checkout file and git checkout branch are too similar. It's too easy to do the wrong thing.
$ emacs build.txt
$ git checkout build
$ git add build.txt
$ git commit -m 'updated build'
But this loses your edits:
$ emacs build.txt
$ git checkout build.txt
$ git add build.txt
$ git commit -m 'updated build'
I've had that second one happen to me when I thought tab-completion would fill in branch names, but it completed filenames instead. It's not a big deal, I'm just pointing it out as an example of how git can lose data other than "reset --hard" and scattered "-f". I still greatly prefer git to anything else.
Subversion 1.8.0 released
Subversion 1.8.0 released
Speaking of not conceding defeat, I have been known to grep through /dev/sda to find lost files :) It can work if they're short enough to fit in a few blocks.
Subversion 1.8.0 released
