Progress isn’t Always Linear. Especially at a Startup .
Panic. Fear. Despair.
These three emotions rippled through Peter’s mind three months ago. It felt as though all the work, time and effort the team had invested was in vain.
Microsoft Visual Studio is currently hosting our project on a Git repository which has simplifies the process of sharing the same code base across multiple users. At that time, we were not using Git with any real thought or respect — we only pushed infrequently on an ad-hoc basis and did not have a complete understanding of what it does and how it does it.
In a bid to make up time an external party was hired to help give us a boost with coding duties. Unfortunately, the contractor accidentally force pushed his work before pulling the latest version. As a result, everyone else’s code was overwritten and all the work done over a two-week period was lost!
It was a tough situation to get to grips with. None of the screens worked. Blood, sweat and tears gone to waste.
The next day, our senior tech mentor, Marco Strillozzi, told us to stay calm and keep the faith.
With eagle eyes he started looking through the project’s online log files. Fortunately, Git stores a history of each commit, which meant that somewhere in Git’s file cabinet, the solution lay in wait.
The offending update was located and, like a phoenix from the flames, the deleted code was re-accepted back into the parent project line by line. An hour or so later all was right with the world. With lessons learnt and one of our nine lives used up we looked upon updates with new respect and fear.
The sync function in Visual Studio is now undertaken more often, automatically pulling and pushing the latest code and keeping each person’s code up to date with everyone else’s. This has prevented any more Git conflicts (pun intended).
Little and often is clearly much better than large and infrequent. At least when it comes GitHub updates. Lesson learnt.