Reputation: 47743
I did a stage and commit before doing an initial git remote add.
Consequently here's what I see and it's not able to commit my staged files.
How can I reset/restage all files as if I started from scratch and committing for the first time to this new repo?
So here's what I see now if I look at status. It doesn't recognize any changes.
Upvotes: 1
Views: 225
Reputation: 108111
It seems like you're confused about pushing and committing.
You committed your files locally, then added a remote. This is fine.
Now you can simply push your files to the remote repo, using
git push -u origin master
where -u
will save the tracking information so that in the future you will be able to just use
git push
Upvotes: 3