- 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
INITCOMMIT=$(git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$")
git format-patch --git-dir=/repo_orig/.git --stdout $INITCOMMIT..HEAD | git am
In some cases, just adding the source repository as remote in the destination one, and merge the required branch is better than the previous method.