Git:- git add – not working


I have had to rework one of our git repositories.

Git Commands


Git Add

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


Folder Structure

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.

Git Commands

Git Add

Went back and issued the git add commands.

Git Status

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.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s