- Orig repo:
INITCOMMIT=$(git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$")- Dest repo:
git format-patch --git-dir=/repo_orig/.git --stdout $INITCOMMIT..HEAD | git am| # based on the following: | |
| # http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/ | |
| # http://blog.caplin.com/2013/09/18/merging-two-git-repositories/ | |
| git clone repo_main | |
| git clone repo_sub | |
| cd repo_main | |
| git remote add repo_sub ../repo_sub | |
| git fetch repo_sub |
INITCOMMIT=$(git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$")git format-patch --git-dir=/repo_orig/.git --stdout $INITCOMMIT..HEAD | git ambonus tip: for more darkness > https://darkreader.org/