由于文件未合并,我无法提交和拉出
U user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG
fatal: 'commit' is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>' as
appropriate to mark resolution and make a commit, or use 'git commit -a'.
我尝试过git add -A
然后提交,但仍然无法正常工作。当我尝试
git add user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG
它说
-bash: syntax error near unexpected token `('
此外,我已经手动删除了文件甚至目录post_img
,然后再次提交,它保持不变。有什么问题吗?
试试这个:
git add "user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG"
否则,bash将尝试对(2)
文件名中的内容进行处理。
如果您删除了文件,并且还想从Git中删除它,则必须调用rm
:
git rm "user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG"
或者,您也可以使用git add -u
更新Git已经知道的文件(这也会删除文件)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句