Search code examples
gitgithubgit-push

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


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?


Solution

  • 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.