I somehow accidentally deleted the .gitignore
file in my application and now my editor is being weird… can I just use another one taken from a new app with create-react-app?
EDIT: Well… that fixed it.
I noticed after adding .gitignore
I had to runrm -f ./.git/index.lock
since that prevented me from adding .gitignore
. Check here for more info.
If you haven’t modified the original .gitignore
then yes, it should be the same and works exactly the same way since it’s only there to tel git
what it should ignore.
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 Like
Thanks! It ended up working. I never edited my original .gitignore
manually, so I think I’m good.
I had to delete a lock file that was apparently there in order to add and commit the new .gitignore
.