Вопрос

I need that every time I checkout a revision, the working dir end with just the files and directories of that revision, not matter what existed in the working tree at the time I checkout, with exception of a directory on my working that I never want delete.

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top