if you already did a pull and you came up with master and origin/master but can't merge them, the following command can help you:
git merge origin/master --allow-unrelated-histories
Its not working when I run the command on git bash.
$ git pull --allow-unrelated-histories
Result: fatal: not a git repository (or any of the parent directories): .git
I was also facing the same problem. But I realised I was trying to push my one git project material on other remote git project. Solution:
Clone the fresh project again and this time make sure cloning link is starting from ssh if you have added the SSH key and https:// if you have added the puttyKey.
Managed by avoiding creating the repository with a Readme.
1. crete without readme.md
2. the 'create-react-app' command already have a 'Readme.md' file.
3. Modify teh readme.md later on.
Well you can try and do
# make the local repository recognize the remote
git remote add orign <giturl>
git branch --set-upstream-to=origin/master
#sync the branches
# if any conflict resolve and continue
# push to remote