Recently, I was writing an API for a project at work using Sinatra, connected to a remote on Github. Following a change target functionality from my boss, the API shifted entirely to use Rails instead, so naturally, the file structure changed entirely. My boss told me to just push it to the same branch/repo on the remote and just overwrite the files (seemed a bit odd to me, but I'm just a junior dev following orders).
My mistake came in that I created a new local directory and Git repo and intended to add the remote and pull before making the switch to Rails. Unfortunately, I forgot to do that, and continued on making commits in this new local repository that did not even have a remote.
When it came time to push, I had to add the origin and now, of course, am faced with the error of updates being rejected because this branch is behind it's remote counterpart.
I've looked around online, and have found how to merge two repositories with different histories, but that process involves merging the two repos, which would not work in my case because the file structure is completely different. I am also reluctant (though will do it if there is no better option) to force push because that will overwrite the history on the remote. Is this even possible to do?