I created a repository on GitHub. Repository contains a file called License. I have an existing repository on my local environment. When I try to push that repository, got an error: fatal: refusing to merge unrelated history

Git Error

I tried to pull from remote source. But did not work. I got an error like that.

Git Push Error

I was looking for any solution on Google. I found it quickly. I did append a flag: --allow-unrelated-histories. Then it works!

Git Fix