Skip to content

Commit c1d5dc9

Browse files
authored
Fix cruft changing .git and add info on manual template update (#479)
* Update pyproject.toml Add ".git" to `tool.cruft.skip` (cruft/cruft#199) * Update template_usage.md Add info on manual template update
1 parent fd50d1d commit c1d5dc9

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

{{cookiecutter.project_name}}/docs/template_usage.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,16 @@ The following hints may be useful to work with the template sync:
384384
[list of template repositories]: https://github.com/scverse/ecosystem-packages/blob/main/template-repos.yml
385385
[scverse-bot]: https://github.com/scverse-bot
386386

387+
### Manual template sync
388+
389+
If you prefer to check for and apply the pre-release template updates manually, or if you are working on a private repository not tracked by the bot, you can use cruft. Simply:
390+
391+
- Make sure cruft and pre-commit are installed.
392+
- Make sure your git directory is clean (no unstaged/uncommitted files).
393+
- Run `cruft update` in the root of your repository.
394+
395+
Cruft will check if a newer version of the template is available. If so, it will show you the diff and ask for confirmation before applying the changes to your local files.
396+
387397
## Moving forward
388398

389399
You have successfully set up your project and are ready to start.

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ run.source = [ "{{ cookiecutter.package_name }}" ]
136136

137137
[tool.cruft]
138138
skip = [
139+
".git",
139140
"tests",
140141
"src/**/__init__.py",
141142
"src/**/basic.py",

0 commit comments

Comments
 (0)