I got a problem when trying to push a new change from my local repository to GitHub. First, I did a
git commit -a
, and then git push origin master
. Which gave me error:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:user/repo.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.
So I figured there had been changes in the GitHub repo since my last pull and I then did git pull origin master
which worked fine, but when I now do git push origin master
I get:
From github.com:user/repo
* branch master -> FETCH_HEAD
Already up-to-date.
But the the new file I added is not showing up on GitHub. It is still present in my local repo though. When I try type git commit -a
, it says:
nothing added to commit but untracked files present
and git branch -v
gives:
* master 525fad2 Merge branch 'master' of github.com:user/repo