This must have happened because by mistake you reinitialized git in the same directory. Delete the .git folder using the following command Go to repository you want to upload open the terminal and then use the following commands
sudo rm -r .git
git init
git commit -m "first commit"
git remote add origin https://github.com/user_name/repo
git push -u origin master
After that enter the username and password and you are good to go