I like git worktree, but keep getting into situations where the local working directory is not the same as the remote branch, even though git pull says "Already up to date".
Here's a little MRE I did:
- Created a remote repo in the GitLab web interface.
- Cloned it using
git clone --bare <url> - Added the
mainbranch locally usinggit worktree add main - Added a new branch using
git worktree add new-branch,cded into it and did agit push. - Using the GitLab web interface, I added a file
main-branch-change-1directly in themainbranch, then rebasednew-branchon top of the newmain, then added a second filefeature-branch-change-1innew-branch. git pullon the localnew-branchsays "Already up to date", while commit hash andgit logclearly shows the local is not up to date. The filemain-branch-change-1is present, but notfeature-branch-change-1.git fetch --allin the bare repo followed bygit pullinnew-branchchanges nothing.git pullin themainbranch followed bygit pullinnew-branchchanges nothing.
What do I have to do to sync these changes?
Some screenshots:


