4 ms·
The funny thing is that the xkcd cartoon isn't even that much of an exaggeration. Countless times, I've literally copied files from a working branch, nuked the
by dvt 5y ago
The funny thing is that the xkcd cartoon isn't even that much of an exaggeration. Countless times, I've literally copied files from a working branch, nuked the branch, then pasted them into a new branch because I couldn't get something to merge for some stupid reason that would've taken like half a day to figure out.
- throwawayboise 5y agoSeen it happen so often when people try to get fancy with branches and merges. Yes I'm sure there's always a way to recover using the tools, but if you are not a git guru and don't have one handy, deleting and cloning is usually the more pragmatic way.
- strictfp 5y agoIMO conflict resolution is almost always harder than redoing the change by hand, especially while looking at the old diff and redoing it towards the new branch. Kind of ironic given how hard diff editors try to help.
- stjohnswarts 5y agoWhen I get into a three way merge it's usually just too late in the day, so I will just save off my stuff and merge in manually :) like you said. Two things to compare against is plenty.
- cormacrelf 5y agoI don't see the issue. This is how people fix everything else, it is what comes naturally, and it works every time. I would much prefer it this way, than what Fossil appears to do in section 3.3 of this article, having a single copy of the database per system. mkdir ~/fossils fossil clone https://sqlite.org/src ~/fossils/sqlite.fossil mkdir ~/sqlite; cd ~/sqlite fossil open ~/fossils/sqlite.fossil
- unclebucknasty 5y agoYeah, probably just about every dev has had to do this when first learning git. One way to measure the over-complexity of software might be: 1. How easy it is to screw up 2. How hard it is to fix things once you've screwed up. Git doesn't score well by that test IMO. Back when I first learned Git, I thought it needed an undo, at least for the local repository. Not a revert commit or partial/piecemeal undo this or that, but an "I screwed up, take me back to x point in time or snapshot" level undo.
- stjohnswarts 5y agoYeah, me too. I'm usually only working on a couple of files at a time but then there a conflict. I try to resolve and just keep digging the hole deeper until I just save off my files, do a new checkout and patch them in manually post what ever merge was giving me hell so there won't be any conflicts.