Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitignore files ignored on kickstart #24

Closed
Arteneko opened this issue Jan 13, 2019 · 6 comments
Closed

.gitignore files ignored on kickstart #24

Arteneko opened this issue Jan 13, 2019 · 6 comments

Comments

@Arteneko
Copy link
Contributor

I have a template (here) that contains a .gitignore file, but when I try to kickstart it, everything's copied, except for the gitignore file, which I'd like to include.

Any bug or implicit rule related to that?

@Keats
Copy link
Owner

Keats commented Jan 13, 2019

Yes, right now VCS files are ignored: https://github.com/Keats/kickstart/blob/master/src/generation.rs#L99
I don't entirely remember the reason for that though

@Arteneko
Copy link
Contributor Author

Arteneko commented Jan 13, 2019

Maybe it would be to, by default, avoid copying the kickstart template's .gitignore file?

Still, for now I think it should be mentioned, or made more explicit on the readme, then later changed.

Why not do a "dotffiles" config parameter?

You'd have a file named gitignore, and a config entry dotfiles = [ "gitignore" ], and the behaviour would be to copy the file, adding a . on the destination filename.

That'd also allow having every dotfile in "clear" and not "hidden by default" like on Unix-based systems.

@Keats
Copy link
Owner

Keats commented Dec 1, 2019

That sounds good but maybe some general could make it easier. Eg the template from git has to be in a folder with a specific name and everything in it is copied with no regards to VCS or not. That allows each template to have their own README, CI, docs etc out of the actual template.
I think that's what cookiecutter does. At least using it on https://github.com/pydanny/cookiecutter-django gives me the content of https://github.com/pydanny/cookiecutter-django/tree/master/%7B%7Bcookiecutter.project_slug%7D%7D
The folder name can easily be made configurable as well.

@Arteneko
Copy link
Contributor Author

Wouldn't a way to specifically ignore (or include) files be a technically valid solution?

I've never tried cookiecutter, so I can't attest on how they manage it.

@Keats
Copy link
Owner

Keats commented Dec 12, 2019

It would work but look at a big template like https://github.com/pydanny/cookiecutter-django which has tons of files not part of the template.
It seems the whitelist approach would be easier than the blacklist one here

@Keats
Copy link
Owner

Keats commented Dec 26, 2019

Not happening anymore when v1 is released

@Keats Keats closed this as completed Dec 26, 2019
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

No branches or pull requests

2 participants