git pull remote master in detached head

Viewed 11312

This has been bothering me about git. I have a repository with multiple remotes, and I need to apply hotfixes to the remotes' master branches. So, I try doing:

git fetch remote1 master
git checkout remote1/master

But, I always end up in a detached head state. What is the correct way to checkout the master of a remote and apply a patch?

2 Answers
Related