So starting from initialising git
git init
Add projects files
git add .
Now commit and add commit message
git commit -m "Message about commit goes here"
Add to remote url
git remote add origin <project url>
Now push the changes to remort repository
git push -f origin master -f // for pushing forcefully
If you get error without "-f" then try with "-f".