How to create a git patch from the differences between 2 repos but keep the history? -


the code in our repo copy of download of source rather git clone (the repo wasn't available @ time) when doing git blame, lot of files author downloaded code.

we have since made lot of changes code.

but have access original repo, i'd add git history original repo. wondered if possible?

if do

cd originalrepo git checkout taggedversionineed git log 

copy last commit hash

cd ../ourcode git remote add upstream ../originalrepo git fetch upstream git checkout develop git diff taggedversionhash 

it happily shows differences between 2 without history.

if try

git format-patch taggedversionhash --stdout > ../mypatch.patch 

it seems add commits, not code differences. when do

git checkout -b feature_updatehistory taggedversionhash git < ../mypatch.patch 

i lots , lots of

applying: commitmessage error: patch failed: filename:387 error: filename: patch not apply patch failed @ 0001 commitmessage copy of patch failed found in:    /home/username/www/mycode/.git/rebase-apply/patch when have resolved problem, run "git --continue". if prefer skip patch, run "git --skip" instead. restore original branch , stop patching, run "git --abort". 

the files same, our file downloaded source, commit in patch original repo.

any ideas? there better way this?

have tried cherry-pick changes branch lost history onto branch cloned available repo?


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -