How to move files from one git repo to another preserving history using `git format-patch`and `git am`

后端 未结 2 1769
感情败类
感情败类 2020-12-10 00:26

Problem

I\'d like to move a folder (and subfolder contained files) from one repository to another, preserving the history.

I found one appro

2条回答
  •  佛祖请我去吃肉
    2020-12-10 01:22

    It looks like the problem you are having is that certain files exist in both repositories you are trying to then create them from the patch. In your example these are README.md and .gitignore

    When applying the patch with git-apply, you can ignore these files with --exclude=. See http://git-scm.com/docs/git-apply

提交回复
热议问题