[llvm-dev] Moving to a new machine

via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 24 10:10:15 PST 2021


> While I've got you, one more question. I've cloned llvm_project on my new
> machine. I have only one branch that is interesting on my old machine.
> What is the safest way to bring the files committed on that branch over to
> the new machine and make a branch with them?

My first thought is to take a diff on the old machine, and apply it on the
new one.  This assumes the old branch is "not too different" from main, and
is a set of commits on top of main (and you have been using `git rebase` to
keep it that way).  In that case, using `git format-patch` to capture the
commits on the old branch should work well; move the files it creates to
the new system, create a branch there, and use `git am` to apply the patch
files to the new branch.

It's also possible to add the clone on the old system as a remote branch
on the new system, but that seems overly complicated and not worth the
trouble for a one-time move, unless the branch on the old system is not
based on main or has very extensive differences.
--paulr 


More information about the llvm-dev mailing list