Next.js starter your AI actually understands. Ship internal tools in days not weeks. Pre-order $199 $499 → [Get it now]

How to subtree split in Git

Git subtree split extracts a subdirectory into a new branch containing only the commits that touched that path. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve used subtree split to extract reusable libraries from monorepos without losing history. The standard approach runs git subtree split --prefix to create a new branch, then optionally pushes it to a separate repository. This preserves the complete commit history of the extracted code.

Read More…

How to subtree merge in Git

Git subtree allows incorporating external repositories into your project as subdirectories without the complexity of submodules. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve used subtree merging to integrate third-party libraries while maintaining full control over the code. The standard approach adds a remote for the external repository, then uses git subtree to merge it into a specific directory. This provides cleaner workflows than submodules for vendoring dependencies.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to Detect a Click Outside of a React Component
How to Detect a Click Outside of a React Component

How to Clone an Object in JavaScript
How to Clone an Object in JavaScript

JavaScript printf equivalent
JavaScript printf equivalent

What is the Difference Between Null and Undefined in JavaScript
What is the Difference Between Null and Undefined in JavaScript

Answers by CoreUI Core Team