Git commit, git push to GitHub, nothing more to commit, but GitHub is not updated

StackOverflow https://stackoverflow.com/questions/20574078

  •  01-09-2022
  •  | 
  •  

سؤال

I have committed all changes and pushed to GitHub right after that, but the source viewer on GitHub is only showing the source from three hours ago.

$ git status
# On branch master
nothing to commit, working directory clean

Update

git push origin

This updated the the GitHub repository, for some reason. So that fixed my problem.

I don't really see why this would help, since I assumed that it pushed to origin by default when you gave the command

git push

هل كانت مفيدة؟

المحلول

You can always use

git push origin master --force

to force origin to be an exact copy of your local machine.

USE WITH CAUTION!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top