I've been trying to finish the migration of our old TFVC sources using Git-TFS. It has finally seemed to work but after renaming the automatically created "master" branch (aka making a new one from it and changing the Default branch in Azure DevOps) no one can push anymore. I tried various things I found online nothing has seemed to work. The old branch's name was "master", the new branch's name is "Head/Main".
These are the results I get:
git checkout Head/Main
: Works.git gc --prune=now
: "fatal: bad object refs/remotes/origin/HEAD fatal: failed to run repack"git remote prune origin
: Works but nothing changes.git push
: fatal: The current branch Head/Main has no upstream branch. (I removed it earlier, trying to reset it)git push -u origin
: "Updates were rejected because the tip of your branch is behind its remote counterpart" - This is expected as there are changes on the remote that I do not yet have locally.git branch --set-upstream-to=origin/Head/Main
: error: cannot lock ref 'refs/remotes/origin/Head/Main': unable to resolve reference 'refs/remotes/origin/Head/Main';Content of
/.git/refs/remotes/origin/HEAD
: ref: refs/remotes/origin/Head/Maingit pull origin Head/Main
: * branch Head/Main -> FETCH_HEAD
error: cannot lock ref 'refs/remotes/origin/Head/Main': unable to resolve reference 'refs/remotes/origin/Head/Main'
! 009ac793a8..9bcff8c144 Head/Main -> origin/Head/Main (unable to update local ref)
Quite frankly, I have no clue what I can do to fix this, please help :x