ensure git checkout exists before running npm install