drdoctr / doctr

A tool for automatically deploying docs from Travis CI to GitHub pages.
https://drdoctr.github.io
MIT License
107 stars 30 forks source link

DOC: warn about --force for dirty repos #370

Open stsievert opened 4 years ago

stsievert commented 4 years ago

What does this PR implement? It warns about running doctr deploy with the --force flag and dirty files.

I made the mistake of doing this, and this warning would have prevented my mistake. I am submitting this PR to ask a question: how do I recover those dirty files untracked by Git? Or are they gone forever?

asmeurer commented 4 years ago

doctr deploy --force should basically never be used. It forces doctr to run locally, whereas it normally only runs in Travis. It's only useful for development. We should probably hide the flag.

doctr deploy stashes your dirty changes. It should unstash them, but maybe that failed. You can try running git stash pop manually.

stsievert commented 4 years ago

doctr deploy stashes your dirty changes. It should unstash them, but maybe that failed. You can try running git stash pop manually.

Luckily I've been able to recover. git stash didn't have my changes, but (very luckily) I've aliased rm to move files macOS's "Trash" directory.