1
I checked out an old commit from an application and the following message appeared:
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this Operation with:
git switch -
Turn off this Advice by Setting config variable Advice.detachedHead to false
HEAD is now at 4bf36b5 Created
In this commit there are two branches, Master and another that I created some new features. When I enter this branch with the changes are all there, but they are not yet in Master.
When I give a git status appears to me this message:
HEAD Detached at 4bf36b5 Nothing to commit, Working Tree clean
There is nothing to commit in any branch and when I try to merge Feature to master this appears:
$ git merge featureTransactions Already up to date.
Can someone give me a hint of what’s going on? I’m needing to move up these changes and push it on github to replace what’s there because it broke my application some changes I made.
Try, before trying to merge, to check out the master:
git checkout master
and thengit merge branchDaFeature
. What happens?– Naslausky
$ git merge featureTransactions Already up to date.
– Rafael Costa
This means that all modifications of the
featureTransactions
are already contained in themaster
. Which leads you to believe that?– Naslausky
Only the changes are in the other branch but not in the master.
– Rafael Costa