git add error

sworsman31415926發表於2020-12-31

$ git status
On branch master
Your branch is up to date with 'origin/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)
        modified:   a.exe

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        write_to_the_name_can_change_file/

no changes added to commit (use "git add" and/or "git commit -a")

tssh@DESKTOP-9LP9IL5 MINGW64 ~/source/repos/Project1/c_plus_write_and_read_file/c_plus_write_and_read_file (master)
$ git add write_to_the_name_can_change_file/
error: open("write_to_the_name_can_change_file/tzt.txt "): No such file or directory
error: unable to index file 'write_to_the_name_can_change_file/tzt.txt '
fatal: adding files failed
。。。。。。。。。。。。。。。。。。。。。。。。。。。。
使用下面的方法進行測試
tssh@DESKTOP-9LP9IL5 /cygdrive/c/Users/tssh/source/repos/Project1/c_plus_write_and_read_file/c_plus_write_and_read_file/write_to_the_name_can_change_file
$ rm tzt.txt\

tssh@DESKTOP-9LP9IL5 /cygdrive/c/Users/tssh/source/repos/Project1/c_plus_write_and_read_file/c_plus_write_and_read_file/write_to_the_name_can_change_file
$ ls
a.exe  write_to_the_name_can_change_file.cpp
 

相關文章