PositiveGuy
PositiveGuy

Reputation: 47743

Re-stage All Files in Local Git Repo

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?

enter image description here

So here's what I see now if I look at status. It doesn't recognize any changes.

enter image description here

Upvotes: 1

Views: 225

Answers (1)

Gabriele Petronella
Gabriele Petronella

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

Related Questions