Help with Git please

I started a new website using create react app and started working with git straight away,
for the last week i was committing after each section of the basic site i was making, today i noticed it was adding node_modules to the staging area which i thought was weird cause i thought i had a gitignore.txt file but couldn’t see it , so i checked my github and i saw that the empty create react app which i uploaded was there but no additional commits. i tried to create a new gitignorefile which went fine and then staged it separately and commit -m and it said it was successful.
however when i checked git there was not new commits.
i dont know how i screwed this up but i did(go me!) im not sure what i should do right now?
should i just try and make a new git folder for it on github and commit or should i find out where the hell it thinks its committing my files too?
I used to have an old github account. I made a new github account as i couldnt remember my details could it be some how linked to my old github?

no, the file name has to be .gitignore

be aware that making a commit you are not pushing to github, you need to use the git push command for that. until you push your commits exist only locally

1 Like

sorry the file is .gitignore i just didnt write the .

but i forgot about the push stage so thanks! i will try and push my .gitignore file now and hope that node modules doesnt get added when i git add *

okay so i still have issues i pushed my .gitignore file but when i type git status i still see node_modules in the file list my .gitignore.txt file is just this :

# Dependency directories

without extension, just .gitignore

1 Like

thanks alot node modules is no longer causing issues and im pushing stuff to my github!

i really dont know what or how i messed stuff up but when i do ‘git add *’ i get this error message

warning: LF will be replaced by CRLF in
The file will have its original line endings in your working directory

for multiple files any ideas how to fix this?

google it, it’s a warning, not an error

Maybe you should have a forward slash in front, like /node_modules?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.