Version control - iToto/developmentCycle GitHub Wiki
- Wikipedia’s article on the topic
- Wikipedia’s article on distributed revision control
- Code school’s intro to git series
- Learn Git branching
At Mira we use Git. We have decided to use this as it is a distributed system and it has become quite popular making it easy to find documentation and aid.
Using any kind of version control is a necessity for software development. It is not a nice to have feature like the latest debugger or code analyzer.
Without any kind of change tracking it becomes impossible to know when certain lines of code were introduced and by whom. For a simple one file program with only a couple dozen lines of code and two people on the team this isn’t necessarily a problem. You can simpler turn your head and ask the other person what their code is trying to do. However, in a large team with hundreds of files and thousands of lines of code you may not have time to look for every function definition and ask every developer in the company to find out who worked on what recently.
Using version control lets us work together and know who did what and when. If something stops working, it becomes easy to look at when it stopped working and who has made changes since then.
Using version control allows us to have points in time we can return to. For example:
The server has a bug. You are assigned to fix it. You start looking at the code on the server and find the bug. You fix it quickly and save your file and restart the server. The bug is fixed! You mark it fixed in the issue tracker and go on vacation.
The next day someone else adds a new feature, commits their changes and pushes those changes to the git server. They then run a deployment script on the server which does a clean git checkout from the git server. Your bug fix is lost…forever.
I’d like to emphasize that last point…
If you had committed your code to Git before having them deployed on the server then the next developer would see the changes before pushing theirs. After that, the build script would then get both sets of changes.