Thursday, February 24, 2022

git migration

 

Migrate one repo-a into another repo-b

git clone </path/to/repo-b>

git checkout -b branch-to-merge-repo-a

git subtree add -P aws ssh://git@git.fei.com:7999/in/aws.git <revision>

git push


Then create pull request and merge the new branch into master


Import file/folder history from one repo-a to repo-b


cd repository

git log --pretty=email --patch-with-stat --reverse --full-index --binary -- cloudformation/opensearch > ~/tmp/opensearch.patch

cd ../another_repository

git am --committer-date-is-author-date < ~/tmp/opensearch.patch


git log --pretty=email --patch-with-stat --full-index --binary --reverse -- client > patch

No comments:

Post a Comment