My question is partially duplicate of Moving uncommitted changes to a new branch
However, The trick is, I made changes to few files which belong to a sub-module.
e.g.
My Primary repo: /testing
Sub-module is at: /testing/lib/xyz
I made changes to quite a few files under /testing/*
and /testing/lib/xyz/*
Now I can do a git checkout -b new_branch
and get my uncommitted changes to a new branch. But this will not get the changes under /testing/lib/xyz/*
to the new branch because this path belongs to a sub-module.
Question: How do I move my uncommitted changes including changes to submodule to a new branch.
The reason being, In my haste, I made quite a few changes to a lot of files in my master branch to fix something. Now the fix is working, however, I do not want to merge these changes to master and I do not want to loose these changes as well. So I thought of moving these changes to a new branch and then continue working on the new branch. But then I faced this sub-module issue.