힘내 : 원격 지점을 삭제하는 방법?


0

git에서 원격 분기를 삭제하고 싶습니다 ( remotes/me/ntopng).

$ git branch -a
* master
  remotes/me/ntopng
  remotes/origin/gh-pages
  remotes/origin/go
  remotes/origin/master

그러나 삭제하려고하면 다음이 발생합니다.

$ git push origin :remotes/me/ntopng
Username for 'https://github.com': Drewshg312
Password for 'https://Drewshg312@github.com':
remote: Permission to Homebrew/homebrew.git denied to Drewshg312.
fatal: unable to access 'https://github.com/Homebrew/homebrew/': The requested URL returned error: 403

그래서 https://github.com/Drewshg312/homebrew.git에 swithched :

git remote set-url origin https://github.com/Drewshg312/homebrew.git 

그리고 얻었다 :

$ git push origin :ntopng
Username for 'https://github.com': Drewshg312
Password for 'https://Drewshg312@github.com':
To https://github.com/Drewshg312/homebrew.git
 - [deleted]         ntopng

그러나 지점은 여전히 ​​거기에 있습니다.

$ git branch -a
* master
  pork
  scirius
  remotes/Drewshg312/hb_custom_formulas
  remotes/me/ntopng                <----- STILL THERE!! WTF???
  remotes/me/pork
  remotes/me/scirius
  remotes/origin/gh-pages
  remotes/origin/go
  remotes/origin/master

완전히 삭제하는 방법?

답변:


0

원산지 URL이 정확합니까? 현재 원본 Homebrew/homebrew에는 ntopng분기 가 없습니다 . 당신은 아마 그것에 밀어 넣을 권한이 없습니다.

포크 리포지토리로 푸시하려는 경우 원점은 https://github.com/Drewshg312/homebrew.git


업데이트 된 질문 편집 :

출력에서 볼 수 있듯이

$ git branch -a
* master
  pork
  scirius
  remotes/Drewshg312/hb_custom_formulas
  remotes/me/ntopng          <----- this is another branch on a remote called 'me'
  remotes/me/pork
  remotes/me/scirius
  remotes/origin/gh-pages
  remotes/origin/go
  remotes/origin/master      <----- no ntopng in origin anymore

원격 지점 origin이 삭제되었습니다. 리모컨이 여러 개있는 것 같습니다. 시도 git remote -v하고보십시오. 라는 원격에서 지점을 삭제하려면 me수행 한 작업을 수행하십시오.origin

git push me :ntopng

당신이 맞아요! 하지만 마지막으로 분기를 삭제할 수 있도록 github.com/Drewshg312/homebrew.git 으로 어떻게 변경할 수 있습니까?
Drew

@Andrewgit remote set-url origin https://github.com/Drewshg312/homebrew.git
소피아 펭

게시물을 지금 확인하십시오-업데이트되었습니다
Drew

@Andrew는 답변의 업데이트를 봅니다.
Sophia Feng
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.