I have created a new repository on github. I followed the instructions there and went to my local machine and at the command line typed
git clone --bare <repoName> <etc>
This creates a new directory (repoName.git) and everything seems to be good. I have one source file I have already (previously) worked on and I want to add it to the repository. I copy and paste the file into the repoName.git directory.
Back at the command line now, I type
cd repoName.git
git add .
This returns:
fatal: Not a git repository (or any of the parent directories): .git
I have seen this message in several online tutorials and some StackOverflow questions, but none of the responses to it seem to be what I need.
My Question: Can someone advise me what I am supposed to do from here forward?
Related:
https://help.github.com/enterprise/2.6/user/articles/creating-a-new-repository/ (Doesn't tell me how to add new files.)
What to do after cloning repo from git This one looks like the OP has a different problem than I have.
fatal: This operation must be run in a work tree The most popular answer tells you what to do but now how. If I knew how to implement one of his suggestions it would probably be the answer to my problem.
Why am I getting the message, "fatal: This operation must be run in a work tree?" If the answer for my situation is in this question, I couldn't figure it out. I tried git config --unset core.bare but it did not help me.