Reputation: 21
I am learning React/Redux and started a new app with create-react-app . The problem I am having is that when i check git status it shows every file from the desktop as tracked and ready to be added then committed. Obviously this is not what I want but i'm not sure why this is happening and/or how to stop it. Any help will be greatly appreciated.
Upvotes: 0
Views: 1859
Reputation: 21
I solved the issue by simply initializing the repo from the command line. I'd been banging my head against that wall for about a year and may have found the solution. The process was, create-react-app 'appname', then cd into the app name directory, then git init once inside the directory. I then created a new repo on github and chose the appropriate option. I think it was push existing repo from command line. Anyway, maybe this will help someone else one day.
Upvotes: 0
Reputation: 121
It is happening because you may have the .git file in root directory.
Upvotes: 1
Reputation: 30408
Run git reset HEAD
to unstage all staged changes without undoing the changes in your working tree. After that, git status
should show only unstaged changes.
Upvotes: 0