Don't checkout anything by default on local templates
See original GitHub issueI’m currently translating a cookiecutter template to a copier one, and each time I change something, I have to commit the change for copier to pick it up. At first it was confusing (“why did files that I removed were copied??”), and now it’s annoying (a “wip” commit for every change, and then I’ll have to squash them or something).
I think it’s because copier tries to checkout the latest tag? I’d like it not to do anything if I don’t specify the -r, --vcs-ref
option.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Set up a library to require check out of files - Microsoft Support
Learn how to set up a library checkout to require people have to check out a document before they can edit it, and...
Read more >Your local changes to the following files would be overwritten ...
Only run this if you want to discard local changes. I encountered the same problem and solved it by git checkout -f branch....
Read more >Adding store policies - Shopify Help Center
Optional: If you don't have a Refund policy, Privacy policy, or Terms of service, then you can click Create from template to use...
Read more >git-checkout Documentation - Git
If local modifications in a submodule would be overwritten the checkout will fail unless -f is used. If nothing (or --no-recurse-submodules ) is...
Read more >Development guide for GitLab CI/CD templates
It usually should be used by itself in projects that don't have any other ... like image or before_script in a default section...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, well that makes sense indeed.
However, I cannot predict what you want to test. Is it a copy, a recopy or an update? Besides, when copying a non-git template, the results and features are different, so you could get to unexpected results when comparing your dev with production environments.
However I guess that we can make this assumption: if the template is a local directory and it is dirty, you’re developing the template, so you’re going to want to test those dirty changes, so Copier could take the freedom to do the wip commit dance automatically and print a warning so you are aware of that.
Oh yes, thank you! I happen to have written my tests in a simple shell script though 😅
But I’ll use your fixture if I convert them to a pytest suite.