I would like to share another anecdote with you. Some years ago I worked for a company that forced me to use git. I used to work from my home office and commit my changes to the company's git repository. Needless to say that I use SVN in my home office and I admit that I am not a git expert, not even a frequent user (I avoid it where possible). On the other hand I have a 30-year working experience with various source control systems (RCS, CVS, ClearCase, and now SVN).
One day I was supposed to do a simple fix of one or maybe two lines of source code fix in a handful of files in the remote git repository. Since the repository was rather large (and my DSL line rather slow) I thought it would suffice to only check out the sub-directory that contained the few files, fix and recompile them to make sure the changes would work. Next I pushed my small changes back to the remote git repository. Minutes later I got a call from a colleague asking why the hell I had removed almost all files in the git repository, I can't explain what happened exactly, but after my git push the entire (!) remote git repository now only contained the few files that I had changed and all other files were gone. Luckily a git specialist in the company managed to restore the deleted files (and therefore I was not fired) , but my trust in git is severely damaged since then. Best Regards, Jürgen On 5/25/23 23:56, vvs wrote:
Following recent argument I just wanted to share that anecdote which happened to me right now. That way it would be closer to real life and more funny for you. First, some background. I used to locally mirror GNU APL' Subversion repository using rsync. That was long before it' Git mirror even existed. Today I've decided to update it, what I didn't do for quite some time. I was surprised to see that revisions 1519, 1601 and 1686 together have about 1.7 GB in size! I've aborted that transaction and decided to fake those revisions in my local repository just to save disk space. It all failed for different reasons so I've decided to finally just use plain SVN workspace and ditch my local mirror for good. I could have used git --depth but this wouldn't buy me anything. Now, the story. To save some traffic, I did checkout from my local mirror first. Then I've tried to change the repository URL. I vaguely remembered that I should use a `switch` command. But that didn't work with an error explaining that URLs are different. Heck, but that's exactly why I've resorted to switch! Then I've noticed that there is --ignore-ancestry, which should have helped in that scenario. But it didn't help either. Then I gave up and just did a fresh checkout from a new URL. After googling some more I've finally found a documentation page which explained that I should have used `relocate` instead of `switch`. Also, --relocate option was deprecated which confused me even more. Well, too little too late already :) I've lost 0.5 GB of mobile Internet traffic, some time and yet I knew that in Git I should have only trivially changed repository' origin with `remote`. The obvious moral of this story is: I'm not an expert in SVN. You can lough. And well, that's the point: Git is just more familiar for me :) Have a nice day.