git add . error message #146884
-
|
Hi all, I am new to github and its remote repository features. Initially, the program worked fine and I could execute the relevant commands via VSCode. Here's where the problem began: I wrote some code and I imported it onto VSCode, then tried dragging it onto my Git remote repository. From then onwards I had problems with my git add command. When I open my VSCode Terminal and type git, it works fine. However, when I type "git add . ", I get the following error message: fatal: adding files failed. Is anyone kind and willing enough to offer any suggestions on how to troubleshoot this issue? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Before you add ,you can check the status by typing You should get output similar to the following: On branch example-tutorial-branch no changes added to commit (use "git add" and/or "git commit -a") On branch example-tutorial-branch Maybe try using git add --all If this continue, you can check the status. I hope you find this helpful. |
Beta Was this translation helpful? Give feedback.
-
|
Try using "git add . --verbose" to debug the error and tell me what's the issue. |
Beta Was this translation helpful? Give feedback.
-
|
Here are possible issues:
Otherwise, use |
Beta Was this translation helpful? Give feedback.
Thank you. I fixed the problem another way. I simply just created another repository because the error message points to a corrupted file problem.