I have lost days in my life because of:<p>* being on the wrong branch
* being in the wrong directory
* using the wrong server
* using the wrong version
* needing to clear the cache
* editing the wrong file<p>And similar things. What are good strategies to either not come into these kinds of situations or to quickly get out of them?