[英]How to rename a repo that is on git branch: gh-pages through the command-line?
我已經閱讀了刪除和重命名遙控器的 Git 文檔,該解決方案是“$ git remote rename pb paul $ git remote origin paul”( https://git-scm.com/book/en/v2/Git-Basics- Working-with-Remotes ) 但我相信它適用於僅在 master 上的 repo。 有任何想法嗎? 我一直在嘗試使用上面的解決方案,但沒有重命名 repo。
您可以使用以下命令重命名遙控器:
$ git remote rename <current name> <new name>
您可以使用以下方法刪除它:
$ git remote rm <remote to remove>
遠程包含或跟蹤哪些分支並不重要。
git branch -m <new_name>
git push --delete origin <old_name>
git push origin <new_name>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.