The git command git add -A ./**
saved my life.
Until using this command nothing was working. I also renamed my current directory, went through and removed every single already present .git
directory throughout, including the project root and all sub-directories. Added a very new and thorough .gitignore to the project root, and deleted the old remote repository that was previously started but wouldn't finish properly, all of which finally allowed me to start completely over with a brand new clean slate.
As a quick side note - The only trade-off I made (which was more of a personal choice than a trade-off really, anywho...) was for each sub-directory that already contained a .git
folder, I could have included those directories as git sub-modules instead of completely deleting those .git
directories, which is really the more ideal or proper way of doing it. This was a personal decision, but most likely you will want to make sure to include them as sub-modules rather than deleting them, this way it will allow you to keep not only those repositories commit histories, but also continue to fetch future upstream changes and merge them back into your working directory, so just quick fyi and word of caution here. If you delete them as I did, you will lose all of that, which is probably not what most would want to do I think, so just fyi here!! - Hope that helps somebody!!
The following documentation allowed me to make all of these decisions, which you, yourself, might find useful, just as I did:
Per the git man pages for git add
-A
short for --all
"Updates the index not only where the working tree has a file matching <pathspec>
but also where the index already has an entry. This adds, modifies, and removes index entries to match the working tree.
If no <pathspec>
is given when -A option is used, all files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories)."
Furthermore if you look in their glossary under "glob" you will find usage for a double asterisks like so:
"A trailing /**
matches everything inside. For example, abc/**
matches all files inside directory abc
, relative to the location of the .gitignore
file, with infinite depth."
Users
. Is your repository inC:\Users\myrepo
? Or is it inC:\Users\MyUserName\myrepo
or is it inC:\Users\MyUserName\Documents\myrepo
? – Devastategit config core.autocrlf true
– Sham