0

I am new to using submodules in Git.

I have (somehow) checked out all the submodules, made some changes in one of them, added changes, and commited (one file added, another file modified). I did not git push the changes yet.

When I execute git status I get "HEAD detached from..." message.

Where did my commit end up in?

I would like to get back to master as I am used to. And I would like to apply the changes to master.

How do I do this?

Danijel
  • 8,198
  • 18
  • 69
  • 133
  • 1
    Possible duplicate of [Why is my GIT Submodule HEAD detached from master?](https://stackoverflow.com/questions/18770545/why-is-my-git-submodule-head-detached-from-master) – alex Sep 17 '19 at 14:19
  • In addition to reviewing the info from @alex. I would open gitk and record your current sha. Then `git checkout ` and `cherry-pick your commit git cherry-pick ` – EncryptedWatermelon Sep 17 '19 at 14:25
  • Possible duplicate of [How to reconcile detached head and origin/master? Already checked out old hash](https://stackoverflow.com/questions/48797325/how-to-reconcile-detached-head-and-origin-master-already-checked-out-old-hash) – phd Sep 17 '19 at 14:49

0 Answers0