I set up a remote repository and I can push new changes to it, but I cannot fetch from it, I always get the (rather cryptic) error message:
fatal: Refusing t
I've had this problem when I thoughtlessly cloned a repository instead of fetching it, so that both repositories were masters. If you have done no work on the remote repository, you can fix things with the basic git commands as follows: (1) delete the remote repository, (2) copy the local repository to where the remote one was, (3) delete the local one, and then (4) set up the local repository using
git init; git fetch $REMOTE_GIT_REPOSITORY_URL
Then git pull and git push will do the right things. The advantage of avoiding git remote, per Michael's more efficient and principled answer, is that you don't need to think about the semantics of tracking branches.