How to create react app without git (skipping git)?

I don’t want git initialized in my folder when I create react app by

npx create-react-app appName

When I was working with Angular, it was comparatively easier by just typing the command

ng new my-app --skip-git

Can anyone please tell me the related command for React? I tried searching but couldn’t find any satisfactory answer.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

There’s an open GitHub issue for your case.

TL;DR: There are no current plans to include such an option. The React developers recommend you run rm -rf .git after npx create-react-app appName to achieve these results.

Solution 2

Try npx create-react-app --skip-git.
If this is not working delete the .git folder manually .

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply