我正在嘗試上傳一個 Github 專案并了解如何,所以我嘗試了一個視頻,但結果是:

那是:
PS C:\Users\BRQL\Documents\Github vscode> git.init
git.init: The term 'git.init' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
git.init
~~~~~~~~~~
Category Info
~
: ObjectNotFound: (git.init:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException
uj5u.com熱心網友回復:
正確的命令是git init .,不是git.init
后一種語法不被git.
注意 is best to git init .,意思是在當前本地檔案夾中為專案檔案夾初始化一個新的 Git 存盤庫。
您當前的檔案夾是Github vscode(來自C:\Users\BRQL\Documents\Github vscode)。
除非您的專案是自己開發 VSCode,否則最好提供一個實際的專案名稱(例如,“myProject”),然后鍵入:
git init myProject
這將創建一個C:\Users\BRQL\Documents\Github vscode\myProject您可以在其中開始添加/提交檔案的檔案。
作為替代方案,您還可以使用(對于鏈接到 GitHub 存盤庫的本地專案)GitHub CLIgh命令(在安裝和身份驗證之后)。
具體來說:gh repo create
mkdir myProject
cd myProject
# create a new remote repository and clone it locally
gh repo create myProject --public --clone
uj5u.com熱心網友回復:
您需要先安裝git,您可以從https://git-scm.com/downloads下載 和
混帳.init
不是 git 命令。
git初始化命令是
混帳初始化
您可以從http://guides.beanstalkapp.com/version-control/common-git-commands.html查看 git 的其他命令
uj5u.com熱心網友回復:
對于初學者來說,在本地機器上運行一個新的 Github 專案的簡單方法是先在 Github 上創建它,然后clone使用
git clone url-of-repo
然后,您會在子目錄中獲得一個作業存盤庫副本,其中包含專案的名稱(在創建時給出)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/487333.html
上一篇:匯入模塊無法決議
