Recently i migradted from SVN to git and my team already started to work in fresh git repository.
Later i discovered some problems with conversion and made the 2nd git repo from SVN with some fixes and history rewrites.
Now i have 2nd git copy of SVN repo (whicn i am satisdied with) and i want to patch it with changes which were already made with my team in 1st git repository.
For such purposes i try to use git patches:
git-format-patch --zero-commit --stdout > master.patch
to create single file of changes which were already made tomaster
of 1st git repo- and
git-am
to apply commits from*.patch
file onmaster
of 2nd repository
I specify --zero-commit
, because hashes in patch file will be wrong, sicne i actually have two different repositories.
The problem is that when i try to apply patch with git am master.patch
i get:
Applying: %commit_name% error: patch failed: readme.md:5 error: readme.md: patch does not apply Patch failed at 0001 %commit_name% The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
even when i have only one commit in this patch and i want to apply it on the same repo to get the same commit, but on another branch.