Do you work in small chunks & check in after completing each one?
Updated by Brady Stroud [SSW] 1 year ago. See history
Frequently 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?

Figure: Eating one big meal every three days gives you a bellyache... (aka check in small portions regularly, one large check-in after a few days will give you a headache)
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.