Skip to main content

if you have just master branch and wanna back to "develop" or a feature justejust do this :

git checkout origin/develop

Note: checking out 'origin/develop'origin/develop.

You are in 'detached HEAD'detached HEAD state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout...

then

git checkout -b develop

It works :)

if you have just master branch and wanna back to "develop" or a feature juste do this :

git checkout origin/develop

Note: checking out 'origin/develop'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout...

then

git checkout -b develop

It works :)

if you have just master branch and wanna back to "develop" or a feature just do this :

git checkout origin/develop

Note: checking out origin/develop.

You are in detached HEAD state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout...

then

git checkout -b develop

It works :)

Source Link
amdev
  • 3.1k
  • 3
  • 36
  • 48

if you have just master branch and wanna back to "develop" or a feature juste do this :

git checkout origin/develop

Note: checking out 'origin/develop'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout...

then

git checkout -b develop

It works :)