After push, git says everything up to date but changes are not in the repo

妖精的绣舞 提交于 2019-12-13 06:59:55

问题


I'm pretty new to using Git, so maybe I'm doing something basic wrong. What I'm trying to do is push the commits of a branch to the remote repo on Github. I tried the following line

git push origin Interface 

It returns 'Everything up-to-date', but when I check the branch on Github, my changes aren't there. What am I doing wrong?


回答1:


Before you push make sure that files are added to the index and changes have been committed. Its a good practice to commit with a message. In case you did not commit with message, use git log to find SHA for most recent commit. On the Git-hub check the SHA or message for most recent commit.

While doing git push <remote> <local_branch>:<remote_branch> make sure that you are uploading changes to correct remote and branch.

On the Git-hub verify that you are on the correct branch and revision.



来源:https://stackoverflow.com/questions/32125856/after-push-git-says-everything-up-to-date-but-changes-are-not-in-the-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!