Git Work trees Auto Merging master / Not setting branches correctly
I am trying to use git-worktree.nvim (or worktrees in general neither ways work)
- git clone --bare [email protected]:
/ ./ - git worktree add ./path/
(or do it in the git worktree nvim menu) - cd path
- git reset --soft HEAD~1 (to mimic a state that needs pulling)
- git pull (this pulls down the master branch and merges it with current branch
I have tried setting git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" which fixes the issue of pulling
However this causing all the branches to now have origin/
git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> origin/<branch>
doing what the command says here git branch --set-upstream-to=origin/<branch> origin/<branch> leads me to another error
git branch --set-upstream-to=origin/<branch> origin/<branch>
warning: refname 'origin/<branch>' is ambiguous.
fatal: ambiguous object name: 'origin/<branch>'
Does anyone know what is going on here or how to properly use work trees in a bare repo and have all the branches able to be pulled / updated / downloaded correctly?