-
-
Notifications
You must be signed in to change notification settings - Fork 145
Description
I am trying to use git-worktree.nvim (or worktrees in general neither ways work)
- git clone --bare git@github.com:/ ./
- 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/ in them. Now trying to use git worktrees nvim to download a new worktree. Causes them to download origin/ if no path is specified. If I specify a path it will create it but the branch is not linked it says to do this in the git help message when pulling
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?