Do you work in small chunks & check in after completing each one?
Last updated by Brady Stroud [SSW] 7 months ago.See historyFrequently developers work on long or difficult features/bugs and leave code checked out for days or worse still, weeks.
- What happens if your laptop hard drive dies?
- What happens if you call in sick?
- How can you pair program if not sharing your changesets?
That's why source code should be checked in regularly. We recommend a check-in:
- Immediately after completing a piece of functionality, where the code compiles and passes the unit testsBefore lunch or dinner
- Before leaving your workstation for an extended period of time
If the changes would break the build or are in a state that cannot be put into the main trunk, then this code should be put into a shelveset (sometimes referred to as 'sandbox') in source control. Another good reason to check-in regularly is that it makes it easier to merge your changes with other developers. If all developers check-in lots of changes in one go, you will spend a lot of your time resolving conflicts instead of doing work.
Tip: How can you enforce regular check-ins? Monitor them using a report to see who has not checked in.