Relatively recently, I learned about the git worktree feature and attached my write-up of how I use it in petsc. I have no idea whether the response will be: This has been around since 2015 at least, and you're just now finding out about it? LOL! or: I can't believe I never heard about it either! Since Patrick recently talked about shallow clones with git on slack, I suspect it's the latter (and I didn't hear about this feature from petsc dev's which is where I typically gain all my git knowledge). Basically, if you have more than one clone of petsc on your drive, you'll be interested in the worktree feature. The reason why the write-up is a bit long boils down the fact that we have the `/` in our branch names. It makes things a bit more complicated compared to my other projects (but is nice for the directory structure). I have not scripted away the complexity either -- I haven't reached that level of annoyance. The reason why I just don't have the rst file as an MR, is because the way I have it point to an existing branch seems cumbersome. Perhaps a git guru knows an easier way with some type of detached state or faster way of getting the HEAD to point to the right sha in one go. I'd be very interested if someone knows a better method. Scott -- Scott Kruger Tech-X Corporation [email protected] 5621 Arapahoe Ave, Suite A Phone: (720) 466-3196 Boulder, CO 80303 Fax: (303) 448-7756
participants (1)
-
Scott Kruger