简体   繁体   中英

moving commits from unrelated repository in git, git-p4

I've been learning git and git-p4 and have ended up in a situation where I can't 'git-p4 submit' anymore; patches don't cleanly apply.

I can always re-clone the p4 depot and copy my new changes over the top and 'git-p4 submit', but I'd like to maintain my commit history in the new git repository. Given that the old and new repositories start from an identical state, is there a way of moving commits from the old to the new, even thought the new wasn't 'git clone'd from the old?

You could try and look into git grafts , to see if you can merge the two history (one large in your git repo, and the new short one, from a new p4 clone)

You have more details in the question " How do I prepend history to a git repo? "

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM