I created a bare repo to publish my repository, but I can\'t figure out how to update the bare repo with the current state of the main repository.
For me this combination worked:
git remote add remote_site https://github.com/project/repo.git
git fetch -u remote_site +refs/heads/*:refs/heads/*
git fetch -u remote_site +refs/tags/*:refs/tags/*
git push --mirror
-u parameter for fetch was necessary, otherwise I get the error message: "Refusing to fetch into current branch refs/heads/master of non-bare repository" (see also https://stackoverflow.com/a/19205680/4807875)