Skip to content

Conversation

@stsievert
Copy link

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
Copy link
Member

asmeurer commented Aug 2, 2020

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
Copy link
Author

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.

parser.error("doctr does not appear to be running on Travis. Use "
"doctr deploy <target-dir> --force to run anyway.")
"doctr deploy <target-dir> --force to run anyway.\n\n"
"WARNING: this will remove any dirty files"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just not mentioning --force at all and also hiding it from the --help output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants