I forked the Discourse repository on GitHub. How can I replace it with the existing Discourse installation on my site?

That’s usually a bad idea. You should make changes in a plugin.