I was just starting a new android studio project. Executed
git init
git add .
git commit -m "First Commit
git remote add origin http://....
and successfully create a remote thread to push.
The GitHub repository of my project had already been created, and had been added 3 files including .gitignore license & README by default. Then I executed this:
git push origin master
That's when the err coming... I can't push as usual even after I executed
git pull origin master
They just claimed that there's another tip behind my branch, perhaps because the pull order added a new branch called origin/master and now I'm confused with it.
In fact, I tried push -f once but it didn't ends well because my default files in the GitHub repository were deleted by doing so.
Are there any solutions could let me both keep my repository files and push my commits successfully?