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

[init] add _corral and _repo folders to .gitignore #150

Closed
ghost opened this issue Aug 10, 2020 · 3 comments
Closed

[init] add _corral and _repo folders to .gitignore #150

ghost opened this issue Aug 10, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 10, 2020

It's stated in the Getting started using Corral section of the README.md to add the folder _corral and _repo to the .gitignore file. I think this can be done by the init command that is described ealier in the README.md

So far init doesn't create it's own project folder and that's why I think this behavior should be hidden behind a CLI flag before making it the default behavior.

@rhagenson
Copy link
Member

I was the one who suggested those additions to README so I will voice my opinion on this.

I think it should only add the lines iff .gitignore exists already. On that point, it definitely should be a flag, not on by default so we are not forcing a user into undoing work just because they wanted corral init. If .gitignore is present and the flag is given, I see no reason why we cannot safety assume Git is used and the user wants corral folders to be ignored.

My other thought on the matter though is I would typically run corral init then git init, so then in order for corral to add to .gitignore it would have to create the file, or the user would have to run the two inits in reverse of what I would expect AND create a .gitignore (likely blank).

@fibric How did you see this working with respect to the order of steps a user goes through?

@ghost
Copy link
Author

ghost commented Aug 11, 2020

Corral won't find a .gitignore file no matter the order of execution.
git init doesn't create a .gitignore file unless u set up a git template folder and configure git to use the template folder like so git config --global init.templatedir /path/to/template

I think Corral can check for the presence of the .git folder which exists after git init is executed. When executing Corral with parameter i.e. --with-git it can create (if-missing) the .gitignore file and append _corral and _repos.

If https://github.com/ponylang/library-scaffolding-generator is still alive, it also could care about the .gitignore file. It already creates the file and writes some content to it. But I think Corral is still the better place to care about Corral related gitignore entries.

@SeanTAllen
Copy link
Member

Closing.

Creation of a default .gitignore should be part of #147 when it is implemented.

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