<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 17 October 2018 at 08:46, James Y Knight via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span class=""><div dir="ltr">On Mon, Oct 15, 2018 at 7:58 AM Danila Malyutin <<a href="mailto:danila.malyutin@synopsys.com" target="_blank">danila.malyutin@synopsys.com</a>> wrote:<br></div></span><div dir="ltr"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="m_-6039291274196612292gmail-m_8976261634261660527gmail-m_-9164445157332819757WordSection1">
<p class="MsoNormal">Great to hear!<br>
<br>
Are there some migrations strategies for those who are using llvm-mirror repositories?<u></u><u></u></p>
<p class="MsoNormal"></p></div></div></blockquote><div><br></div></span><div><div dir="ltr">It'd be great if someone wrote down some exact step-by-step instructions for this. :)</div><div dir="ltr"><br></div><div dir="ltr">But, basically -- if you're migrating from another monorepo repository with the same layout, but different hashes, I find the easiest procedure is to simply add the new upstream into your existing repository and then rebase your branches onto the new upstream.<div><br></div><div>An alternative scheme, which has the advantage of also working if you're converting from separate repositories to a monorepo, is to run something like "git format-patch --stdout origin/master..mybranch > mybranch.patch", for each of your branches you want to save, and then, in a new repo, create new branches, and use "git am" to apply your patch. If you're converting from non-monorepo, then you can use the "--directory" argument to "git am" to apply the patch onto a subdirectory of the repository.</div><br class="m_-6039291274196612292gmail-Apple-interchange-newline"></div></div></div></div></div></div></div></blockquote><div><br></div><div>

<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">There's probably a way to use git filter-branch with .git/info/grafts to preserve complicated merge histories. If you have any of those. Though changes to the folder structure will likely complicate that approach.</span><br class="gmail-Apple-interchange-newline"></div></div></div></div>