我试图跟踪一个远程分支并最终执行了以下操作:
$ git branch --track origin/branch1
Branch origin/branch1 set up to track local branch branch1.
这显然不是我打算做的。我将如何撤消此设置?我尝试自己纠正它:
$ git branch --track origin branch1
error: there are still refs under 'refs/heads/origin'
fatal: Failed to lock ref for update: Is a directory
$ git branch --track branch1 origin/branch1
fatal: A branch named 'branch1' already exists.
$ git branch --no-track origin/branch1
fatal: A branch named 'origin/branch1' already exists.
……无济于事。提前致谢!