git-无法提交阶段文件
我只是 git 的初学者,我尝试提交 2 个文件,多次尝试使用git add, git add ., git add -a, git add -A,git add --all我尝试 git commit -am "fist commit"
我的项目树结构:
我的不同尝试:
当我尝试:
git add> git commit -am "first commit":
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: vue-antd-admin (modified content, untracked content)
modified: vuestic-admin (modified content)
与git add -a> git commit -am "first commit":
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: vue-antd-admin (modified content, untracked content)
modified: vuestic-admin (modified content)
git add --all> git commit -am "first commit":
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: vue-antd-admin (modified content, untracked content)
modified: vuestic-admin (modified content)
一次又一次……
当我尝试打开这两个文件时,这是来自 VS 代码的错误:
Unable to open 'vue-antd-admin (Working Tree)': Unable to read file '/Users/mac/Desktop/Test-site/vue-antd-admin' (Error: Unable to read file '/Users/mac/Desktop/Test-site/vue-antd-admin' that is actually a directory).
Unable to open 'vuestic-admin (Working Tree)': Unable to read file '/Users/mac/Desktop/Test-site/vuestic-admin' (Error: Unable to read file '/Users/mac/Desktop/Test-site/vuestic-admin' that is actually a directory).
也许他认为vuestic-admin&vue-antd-admin不是文件,我不知道,我对此非常绝望......