我按照這些步驟:無法添加文件,而不是一個Git倉庫
$ cd $Home/projects/
$ git clone https://github.com/someUser/someRepo.git
$ git add .
fatal: Not a git repository (or any of the parent directories): .git
$ git commit -m "first commit"
fatal: Not a git repository (or any of the parent directories): .git
步驟2.5:cd someRepo –
出於興趣,您希望'git add .'做什麼? – doctorlove
你需要在git倉庫中。要確定當前文件夾是否爲一個,您可以運行'git status'或在當前文件夾中查找'.git'目錄。你總是可以使用'git intit'在任何地方創建一個git倉庫。 – k0pernikus