Closed nstarman closed 1 year ago
We used to do this, but it was a bit of a pain. All you need to do is run git init
after cookiecutter.
Fair enough. I'm just looking at the large number of items I still do on project startup and hoping to automate them away.
What specifically was the pain point?
Could a post_gen_project hook make the folder afterwards? Or is git init
preferable?
This is an interesting idea but I'm a little hesitant to impose the requirement that a .git folder be created. I could see that leading, in some edge cases, to unexpected behavior.
It might work as an option in the cookiecutter dialog to create a git repo by running git init
post-generation, though I 'd argue for a default value of "no" for the option.
here is an old version of the hook which used gitpython to init the repo and the old astropy_helpers submodule, hth :smile:
Thanks for the suggestions. I like the idea of actually running git init
rather than manually generating the file.
yeah I wouldn't recommend manually generating it.
it would be nice to be able to import a repository into GitHub rather than create the repo and add the cookiecutter-generated contents. I think adding a .git folder with the bare minimum of files could accomplish this.