I'm trying to copy the commit history (git log
) from one repo to another. I have found another topic that asked a similar question. The solution was to run:
git log --pretty=email --patch-with-stat --reverse -- path/to/file_or_folder | (cd /path/to/new_repository && git am)
I have run it, and it looks like it works (the log history the same). But this change is only local. How can I do it to remote also?
I can't use git add
and then git commit
because I don't have anything to commit.
How can I change the history of the new repo to be the same as the old repo (they both contain the same files without changes).