Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'git status' shows changes to be commited, but 'git push origin master' says 'Everything up-to-date'

I had some conflicts between my local repo and the remote repo.

So, I did:

git stash
git pull origin master
git stash apply

// here i had merge conflicts, so i edited the files and did
git add file1
git add file2

git commit

Now when I do git status it shows a bunch of modified files, etc. But git push origin master says Everything up-to-date.

Any ideas?

like image 624
99miles Avatar asked Dec 09 '22 15:12

99miles


2 Answers

If git status is showing modified files, those aren't going to be pushed because they're not committed yet. git status only shows changes that haven't yet been committed (even if they have been staged).

Try committing again and see if there are any error messages when you go to commit. (You may also need to git add files that didn't have merge conflicts, if they were affected by whatever your popped from your stash - stashing doesn't save stage state.)

like image 183
Amber Avatar answered Dec 22 '22 00:12

Amber


Did your commit actually succeed? If you had indeed made a commit since you pulled, pushing back to origin would have to push that commit. It sounds like you haven't. The fact that git status shows modified files still is another sign that you haven't - ideally, you'd end up with a clean tree after commmitting; git status would show "nothing to commit". If they're still showing up as modified, they haven't been committed yet.

like image 20
Cascabel Avatar answered Dec 21 '22 23:12

Cascabel