Every time I tried to push it says Everything up to date. I have done updates previously but this time I think i made a mistake of writing "commit -a" instead of "commit -m". My Changes are staged but i am unable to push them Please Help. My branch is main enter image description here I want to push my updates to my repo
CodePudding user response:
To fix this, you can run git commit
without the -a flag and use the -m flag to provide a commit message. This will commit your changes and allow you to push them to your remote repository.
CodePudding user response:
It looks like your origin
is not set up, you can verify this with
git remote -v
Which should show something that looks like this:
origin [email protected]:USERNAME/REPOSITORY.git (fetch)
origin [email protected]:USERNAME/REPOSITORY.git (push)
If it doesn't you can look up how to set up your upstream origin
.
But if you have not committed anything, nothing will get pushed. So just do commit -m "COMMIT MESSAGE"
to commit after you have done git add
.