create-apollo-app icon indicating copy to clipboard operation
create-apollo-app copied to clipboard

Add .gitignore to scaffolding process

Open CodeSpent opened this issue 3 years ago • 3 comments

I'm not sure if this is an oversight, or intentional, but I'd love to have the discussion documented. There is currently no .gitignore boilerplate, which adds a little extra work after starting the project. I'm proposing adding this, and potentially also adding the git init step to the scaffolding process.

I think it is fair to assume (or just provide an option) that someone would be using git for these projects, so could be a tiny win to go from running the create apollo-app command to writing code straight away.

I'm happy to contribute this if maintainers approve of this idea?

CodeSpent avatar Jan 22 '21 18:01 CodeSpent

@CodeSpent I'm fine with this idea, but we should ignore git init errors, so that if use do not have git installed it won't fail

larixer avatar Jan 23 '21 07:01 larixer

@larixer great, I can handle that. Do you think it'd make more sense to add a second option after the initial menu selection asking the user if they want to initialize git? Can still fail silently, but this would also let them opt out of a .gitignore if for any reason they don't want one.

CodeSpent avatar Jan 23 '21 19:01 CodeSpent

@CodeSpent I think pretty much everyone uses git these days, so just failing with a warning is fine, IMO, no need to complicate the task for yourself

larixer avatar Jan 23 '21 19:01 larixer