You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rm -rf .gitignore .git if user don't want to set git
Option 1 is closer to my workflow of using other code generators, but I prefer option 2 if it is available (save me a few minutes of wandering on GitHub).
I am happy to try adding both options to CRA if you like. I see most of the work has been done by @torifat in PR #368.
@gaearonember-cli initializes a git repo for you by default and makes an initial commit. No remote is added, you have to do it yourself. No instructions are provided. Some ascii art included in the initial commit (GitHub for Mac screws up fonts tho). See attached pics.
I'd say by default do the same as ember-cli does and provide --git switch to automatically set up a remote.
I actually think this is unneeded default. From my personal experience most of the time the React client code is part of a bigger project with server code that is already under version control. Also there are a lot of people using Mercurial.
The most sane option is to output the necessary steps after a new project is created, just as when you create a build suggestion is shown to run a push-server.
Nooooo... I've just started working on this 😢 Luckily I'm still in the planning stage. Was looking around the ember-cli codebase. If we've decided to do it later, here's how ember-cli does it.
How hard could it be to do git init that it needs to become a default for CRA? I would rather see this as a part of the User Guide with a sample .gitignore provided.
It’s not really hard but I often find myself forgetting to do it, and by that point I have changed something and can’t roll back. This can be a real issue for beginners.
I agree with your concerns in #385 (comment) but there is nothing preventing us from checking if we’re inside a Git/Hg project before attempting to create a repo.
Activity
Jiansen commentedon Aug 6, 2016
Please add a discussion label to this issue.
gaearon commentedon Sep 3, 2016
What do other tools (ember cli, angular cli) do?
mareksuscak commentedon Sep 11, 2016
@gaearon
ember-cliinitializes a git repo for you by default and makes an initial commit. No remote is added, you have to do it yourself. No instructions are provided. Some ascii art included in the initial commit (GitHub for Mac screws up fonts tho). See attached pics.I'd say by default do the same as
ember-clidoes and provide--gitswitch to automatically set up a remote.gaearon commentedon Sep 24, 2016
Let's do what Ember CLI does, sans the Tomster. Would you like to send a PR?
mareksuscak commentedon Sep 24, 2016
@gaearon I can do it. Are there some extra requirements beyond initializing a repo and making the first commit?
gaearon commentedon Sep 24, 2016
A must.
I think initializing git is a sane default. @vjeux Any objections?
Yes.
ivosabev commentedon Sep 25, 2016
I actually think this is unneeded default. From my personal experience most of the time the React client code is part of a bigger project with server code that is already under version control. Also there are a lot of people using Mercurial.
The most sane option is to output the necessary steps after a new project is created, just as when you create a build suggestion is shown to run a push-server.
gaearon commentedon Sep 25, 2016
We could detect if the folder is part of a git repo and bail.
vjeux commentedon Sep 26, 2016
I think that it's pretty common nowadays to create a git repo for every small project. I'm down to do it by default.
gaearon commentedon Sep 30, 2016
I don’t feel strongly about this and I don’t think it’s important at this point so I’ll close.
mareksuscak commentedon Sep 30, 2016
Nooooo... I've just started working on this 😢 Luckily I'm still in the planning stage. Was looking around the
ember-clicodebase. If we've decided to do it later, here's howember-clidoes it.gaearon commentedon Sep 30, 2016
Haha, sorry 😄
gaearon commentedon Dec 12, 2016
This keeps coming up: #1244.
Maybe let’s do it?
ivosabev commentedon Dec 12, 2016
How hard could it be to do
git initthat it needs to become a default for CRA? I would rather see this as a part of the User Guide with a sample .gitignore provided.gaearon commentedon Dec 12, 2016
It’s not really hard but I often find myself forgetting to do it, and by that point I have changed something and can’t roll back. This can be a real issue for beginners.
I agree with your concerns in #385 (comment) but there is nothing preventing us from checking if we’re inside a Git/Hg project before attempting to create a repo.
mareksuscak commentedon Dec 12, 2016
Maybe I could continue where I left off the last time but not today.
gaearon commentedon Dec 12, 2016
Let’s coordinate work on this in #1244.