Like e-mails, blog posts should not be written while angry. Because my career isn’t on the line here, I’ll go ahead and break that rule.
They use Git, I use Mercurial.
After doing a lot of research comparing Git and Mercurial, I decided to just go with Git.
In total, I’ve spent about 20-30 minutes of my life learning and figuring out issues with Mercurial.
In the last few weeks, I’ve spent at least 2-3 hours with Git because it has been a hassle each time I need to pull updated from the origin, or push my changes.
These were all simply annoying until the fateful evening of 9/16/2014.
I had done a few hours of work over a few nights trying to work out some bugs, and I finally went to commit because the bugs were gone. I committed, and went to bed.
(Note: Some people will argue that you should commit every hour or two, it’s a VERSION control system, I don’t believe in saving half-working code because I’m going on a lunch break)
Tonight, I launched my solution file in Visual Studio only to find out that my projects weren’t loading. “That’s strange”, I thought. Then I proceeded to look inside the project directory and gaze upon the bareness in shock. It was gone, all gone. Somehow, only a few of the publishing directories and my SLN file were left intact.
The real lesson
Now, I’m sure at this point the Git afficianados reading this are on the edge of their seats screaming “YOU PROBABLY RAN … COMMAND! IT’S YOUR FAULT!”
Ok, I’ll take the blame. I could learn more about Git. I could also spend time doing a lot of things instead of writing code like I want to. Refer to my figures before – I’ve spent about 20-30 minutes reading Mercurial documentation and have not had a single catastrophic failure like this in 2 years. I’ve spent far more time than that on Git, and in less than a month I’ve had a catastrophic failure.
The lesson? Use what works for you! Maybe I’m just not wired in a way for Git to make sense, that’s OK, because Mercurial does.
So, don’t worry about what the “cool kids” say is the best Version Control System – just make sure you’re managing your code in a way that works for you.
The moment this happened, I couldn’t help but remember one of the posts I read while researching this. Here is an excerpt from a Stack Overflow answer to the question “Is there any harmful commands using Git and HG” :
- Mercurial is safe by default, but adding chainsaws can completely break it.
- Git is built out of chainsaws from the ground up, increasing apparent danger, but there are safeties.
Some of you may be wondering what I did to solve this issue. I spent a bit of time trying to figure out what I would do as well. Then it hit me. I think I’ve written a blog post about this before…
I have my Backblaze set to automatically back up my files. I just had to log into the website, go back to last night at 11 PM and download a copy of the project folder. I got my 200 MB backup of the folder in less than 20 minutes. This service just paid for itself for the next year!
378 total views, 4 views today