added check for git checkout