I have had to rework one of our git repositories.
I issued git add commands a few times, but “No Go“.
The syntax and sample is shown below.
git add <sub-directory>/<file>
git add v2.14.1/compile.cmd
Finally, I checked the sub-folder that I was trying to add files from.
And, behold there is a .git folder within the targeted sub-folder.
Here is an image of the directory structure showing the .git folder.
Please rename the .git folder underneath the target of your git add <folder><file> command.
Image – Directory – .git renamed as .gittxt
Here is an image of the directory structure showing the .git folder renamed as .gittxt.
Went back and issued the git add commands.
Issue “git status” to confirm the files have been added.
Image – git – git status – files successfully added
Rearranging folders and files is never quite as done as you think you are.
But, worth it, as it shows you are thinking and doing something about your thoughts.