Maybe you just need some additional commands after the checkout.
git clean -fxd
This will clean the wa for any files that is not related to the repository also files that are ignore by git. remove the x and files ignored by git will not be deleted
git reset --hard HEAD
This will reset all the files in the WA to the stage they are in the HEAD.
Cheers
Rasmus Voss