Tim Tim - 26 days ago 5
Git Question

git push not send changes to remote git repository

I am making changes to some file in my local git repository and then want to send the changes to the remote git repository from which the local was cloned via ssh.

After run "git commit -a" on my local side, to send the changes to the remote, I run

$ git push
Everything up-to-date

However I checked the remote files and they are not changed!
Any idea?

Thanks and regards!


You probably pushed into a non-bare repository, i.e. a repository that has a working copy attached to it. You shouldn’t have ignored the warning git push gives you if it notices that this is the case.

Anyway, log in to the remote machine, change to the repository and do

git checkout <whatever branch you’re on>

There you go. Next time only push into bare repositories. :)