Simplify workflow "copier copy && git init && git add/commit" #2167
OverkillGuy
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been maintaining a personal project template for a few years (love you, copier!), and one of my pet issues is that the result of expanding the template is for me always intended to be a git repository.
But to set that up, I've had to make a
taskthat runs (abbreviated here, see below for full)git init && git commit, rendering the template "unsafe" + breaking update workflows (unless I--skip-tasksduring updates) for what feels like a very common workflow.I wish I could specify that the template's output is meant to be a git repo, and ideally what the commit message can be (though remain editable), so that I can remove this unnecessary unsafe-ness.
So, first, a question for other users, how do you make your template generate a git repo, and how common is it that you don't make a git repo = not need that feature?
Am I missing something, that such a common workflow is not part of this tool that thinks so much and so well about templating?
Towards a feature suggestion
If this is of interest, I could imagine a new option group for initializing git repo as outcome of the last task, doing that init && add && commit via copier = trusted.
Remains a few questions if so, around things like:
Appendix: my current workflow
For illustration purposes.
I found it interesting to make the task run not just
git initandgit commitbut alsogit tag v0.1.0, to ensure that the resulting first commit is workflow-ready, a real "package" at a real (if useless) version of the repo.See the task definition:
and the project's
hooks/git_init_project:Beta Was this translation helpful? Give feedback.
All reactions