Chapter 4: Working with a Repository
If you're like me, then you've had that moment when the day your code is due, you accidentally botch some code changes at 3 a.m. or accidentally delete a critical file. At first, there is panic and a frantic search for a backup or some copy of the code somewhere! Then, a wave of calmness washes over you when you realize a recent copy of that code is stored in source control and all you have to do is retrieve it. If you're using Git, for example, this may be as simple as issuing a git reset
command. Likewise, if using Visual Studio's UI for Git, the Undo Changes functionality will have you covered.
Starting with version control should become deeply ingrained in your development processes. Think about it as performing on a high wire without a net. Even the best high-wire artists still use a net because it protects them, just like your code repository protects you.
When we talk about version control systems (VCS), we are talking...