I’ll tell you, probably, not the most serious mistake, but the one that I remembered for my whole life. Many of you have heard the joke: “People are divided into two types: those who don’t do backups, and those who already do it.”
I joined the ranks of those who are “already doing” in those old days, when my colossal work experience was as long as 3 or 4 months.
I came across an urgent and difficult project for me – an interactive map of cottage plots. I don’t remember many details besides the fact that there was some kind of bacchanalia from Canvas, Area Map and other things. And it was necessary for this to work in IE7. By the way, complexity got out with IE8: it was necessary to force it to be switched to IE7 mode with meta, because there was a problem with opacity. So many years have passed, but I remember it, remember and cry. Given my experience, it was, I tell you frankly, a very, very entertaining experience.
I sculpted, which means that I sculpted this business for about a week, here the deadline is already approaching. A couple of finishing touches remain, and suddenly, you guessed it, something irreparable happens.
I come to work in the morning – the computer is turned off, hmm … Turn on and … nothing is loaded. Shock, panic, despair, gray hair. You don’t think, even then I knew what Git was. But I did not make commits until I complete the task, even if it is large. This is now, in any situation, after a logically hung up piece of code – commit and upload, even to a temporary branch! But it is now.
So, the admin comes and says: “Do not panic, now everything will be.” Hair begins to acquire its natural color. But after half an hour the admin returns with the words: “No, after all, it won’t. The screw died completely. ”
They managed to restore everything in a record, but sleepless two days. Fortunately, in those days, because of my inability to think, predict and understand what I was doing, I wrote everything down on a piece of paper: flowcharts, animation formulas, and coefficients. This helped recover most of the code relatively quickly. Well, the problems that spent the first time finding a solution were already known.
In general, make backups. Communicate more often. And if you don’t like when there are a lot of commits in the tree, just do after the completion of each squash task.