cd into that repo (i.e. cd/xxx) remove the .git/
rm -r ./git
re-initialize the main repo after cd back to main (i.e. cd ../)
git init
git add .
Accept the changes and then git pull
git merge --abort
git add [path_to_file]
or
git rm [path_to_file]
then
git push
- Create a repo 2) add a file (README or whatever) 3) clone the repo in local directory 4) add the files you want to commit.