0

I am suffering from a problem in git. I tried may solutions but in vain to find what is going on. My problem is

$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/RC-1.0.0
  remotes/origin/master

I am trying to checkout a remote branch i.e RC-1.0.0:

$ git checkout RC-1.0.0
Note: checking out 'RC-1.0.0'.

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. 

If you want to create a new
branch to retain commits you create, you may do so (now or later) by 
using -b with the checkout command again. 
Example:

git checkout -b new_branch_name

Any help appreciated

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
honey
  • 3
  • 4

1 Answers1

0

Its not a problem.

Read this answer to understand what it means: How to move HEAD back to a previous location? (Detached head)


How to fix it?

All the details why it happen is in the above question.
What you need to do is this:

# create a new branch starting from this tag
git checkout -b <branch name>

What is the problem?

When you checkout branch/tag etc you cannot work on it directly, you have to create branch in order to be able to commit and new changes starting at this point.

enter image description here

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167