Backlinks

  • Hello

DuplicateMergeBetweenGitRepos

08 Mar 2022 (modified 08 Mar 2022)1 min read

  • Git

Compiled from the following sources:

  • https://stackoverflow.com/questions/931882/how-to-apply-a-git-patch-from-one-repository-to-another
  • https://stackoverflow.com/questions/2285699/git-how-to-create-patches-for-a-merge
  • https://stackoverflow.com/questions/5685007/making-git-log-ignore-changes-for-certain-paths
$ git log -p --reverse --binary --pretty=email --stat -m --first-parent SOURCEREF..origin/main -- . ':!excludeRandomFile.json' > ../my.patch
 
$ cd ../anotherRepo/
 
$ cat ../my.patch | git am

~nicolaw

Übergeek & CatLoaf Facilitator