I created a repo directly on GitHub using by browser, than using git bash cloned the repo to my machine, I was able to do a test commit with bash using the readme file.
I keep getting fatal: This operation must be run in a work tree when running git –work-tree=yourSrcFolder add .
Was looking here and here for some clue but after 4 hours ready to give up on ever using Git.
Simply move any file you wish to add into the repo directory, then add them to the git tracking.
Example: suppose you want to add a file named
test.txtto your git repo.git add test.txtgit commit -m "Added test file to the repo"git push