We have a git repository we have been using over a span of two years to track a long-term project. Recently we moved most of our current and new projects from GitHub to a private gitlab installation. Unfortunately we didn't move this specific project, and a few weeks of work have gone into the new repository.
Mind you, the repository's starting point is the same file structure as the last commit of the old GitHub repo, so basically we want to copy the commit history from the GitHub repository into our already-started repo.
As I'm trying to visualize this for you, here is a screenshot of the git log of our new repository:
Pull the original project into a new branch in the new repo, then cherry-pick the commits in the new repo's existing branch (except the original commit) onto the new branch.
This will create a separate branch with the history you want. Review the new history, then push it (
-f) over the existing remote.