nothing added to commit but untracked files present (use“git add“to track)
报错内容:
①nothing added to commit but untracked files present (use “git add” to track);
②error: pathspec ‘test3.txt’ did not match any file(s) known to git;
问题解决:
报错提示:提交时未添加任何内容,但存在未跟踪的文件(使用“git add”跟踪)
这是由于我们对于这个文件test3.txt,尚未将其放入到缓存区,因而需要先使用git add命令对其进行跟踪,将其从工作区转移到缓存区,然后再使用git commit命令。