我有幾個專案已經開始作業。我想跟蹤我所做的所有更改,所以我決定初始化一個存盤庫并將所有更改推送到 Github。
我按照以下步驟操作:
- git remote add origin [email protected]:Anirudh-RK/Audiophile-App.git
- git branch -M main(或master)
- git push -u 原點主
在最后一步,我輸入我的憑據,并粘貼 github 提供的身份驗證令牌。但是,它會引發各種不同的錯誤,例如只允許讀取訪問權限,拒絕寫入權限等。我該怎么辦?我反復卡在這一步。
任何建議將不勝感激。
uj5u.com熱心網友回復:
使用gh命令列工具管理授權使他們的作業更輕松。使用如下gh命令后,您需要的所有指導都可以從命令列逐步完成。該gh命令列工具可以用來創建不可用在GitHub倉庫。需要使用該gh repo create命令一次來創建存盤庫,如下所示。git push如果只有一個分支,則使用該命令將起作用;另外,如果在遠程倉庫上創建了多個分支,則需要選擇目標分支。
# start version control in repository
git init -b main
# select tracked files and commit
git add . && git commit -m "initial commit"
# To push the repository to GitHub
gh repo create
按照此鏈接gh在 Windows 作業系統上使用命令列工具。
參考
- 使用命令列將現有專案添加到 GitHub
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/405532.html
標籤:
