현재 리포지토리에는 다음과 같은 출력이 있습니다.
$ git branch -a
* master
remotes/origin/master
remotes/public/master
remotes/public/master지점 목록에서 삭제하고 싶습니다 .
$ git branch -d remotes/public/master
error: branch 'remotes/public/master' not found.
또한 git remote목록에 없기 때문에 출력 이 이상합니다 public.
$ git remote show
origin
지점 목록에서 '원격 / 공공 / 마스터'를 어떻게 삭제합니까?
업데이트하고 git push명령을 시도하십시오 .
$ git push public :master
fatal: 'public' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
git remote prune [remote-name]git svn 에서는 작동 하지 않지만 git gc... git branch -rd origin/name하지만 작동하지 않습니다. @Casey, 아마도 두 번째 대답을 선택해야 할 것입니다-그것은 덜 위험합니다.
master특히 원격에서 삭제할 때와 는 다른 가지를 사용하는 것이 좋습니다 .
git remote prune [remote-name]나git fetch -p [remote-name]시나리오에서 작동하지? 함께하는git gc것이 일반적으로 필요한 것보다 훨씬 강력합니다.