I can not commit and pull because of an unmerged file.
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'.
I have tried git add -A
and then commit, but it's still not working.
When I tried
git add user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG
it says
-bash: syntax error near unexpected token `('
Besides, I have manually removed the file and even the directory post_img
and then committed again, but it remains the same. What would be the problem?
Try this:
git add "user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG"
Otherwise, Bash will try to do something with that (2)
in the file name.
If you removed the file and want to also remove it from Git, you have to call rm
instead:
git rm "user_data/post_img/kesongxie/LuYWf7nM915SQ0X/003(2).JPG"
Or you can also use git add -u
to update files Git already knows about (which will remove the file too).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With