That's exactly it. My work finds me doing this sort of thing quite a lot. I don't know if my (the following) approach is overkill however, it works reliably for me.
```
# Clone the main repo
git clone
https://gitlab.haskell.org/ghc/ghc.git# Add remote
git remote add tdammers git@gitlab.haskell.org:tdammers/ghc.git
# Get remote's branches
git fetch tdammers
# Roll the main repo back to where tdammers /some-branch started
git checkout `git merge-base tdammers/some-branch master`
# Retrieve sub-modules as they were at that point
git submodule update --init --recursive
# Now switch to the remote branch
git checkout -t tdammers/some-branch
```
>
More generally, I'm actually wondering, why GHC's .gitsubmodules use relative paths. Why not make them absolute?