I have a remote branch:
git branch -a
*master
remotes/origin/develop
Can I checkout to remotes/origin/develop
? Or should I always create clone of remote branches locally?
I have a remote branch:
git branch -a
*master
remotes/origin/develop
Can I checkout to remotes/origin/develop
? Or should I always create clone of remote branches locally?
I believe you need to clone your remote branches locally if you want to make changes in the remote. When you checkout a remote branch by issuing git checkout remotes/origin/develop
, you will go into a detached HEAD
state, which essentially means you are not on any branch right then.