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

How to combine repositories in Git

Combining multiple Git repositories into one — often called a monorepo migration — requires merging their histories while preserving every commit, author, and date from each source repository. As the creator of CoreUI with 25 years of open-source development experience, I’ve combined separate framework-specific packages into unified repositories and the process requires care to avoid history loss or path conflicts. The standard approach is to add each source repository as a remote, fetch its history, move its files into a subdirectory, and merge the histories with --allow-unrelated-histories. Each source repository ends up in its own subdirectory so their files don’t collide.

Read More…

How to split repository in Git

Splitting a monorepo into separate repositories is a common scaling decision when a codebase grows and different teams need independent release cycles. As the creator of CoreUI with 25 years of open-source development experience, I split the CoreUI monorepo into framework-specific packages and preserved the commit history for each component, which was essential for tracking bug history and attribution. The tool for this is git filter-repo, which can extract a subdirectory into a new repository with its full commit history. The result is a standalone repository containing only the commits that touched the extracted directory.

Read More…

How to add a submodule in Git

Managing shared code across multiple projects often leads to code duplication and synchronization issues, especially when working with libraries or components used in several repositories. With over 25 years of experience in software development and as the creator of CoreUI, I’ve managed complex multi-repository setups for component libraries, documentation sites, and enterprise applications. From my expertise, Git submodules provide the most reliable solution for including external repositories within your project while maintaining independent version control. This approach allows you to track specific commits of external code, ensuring consistency and reproducibility across your development workflow.

Read More…

How to work with submodules in Git

Managing dependencies on external Git repositories requires a way to include them in your project while keeping their history separate. With over 25 years of experience in software development and as the creator of CoreUI, I’ve used Git submodules in numerous projects to manage shared libraries, themes, and component packages. From my expertise, the most reliable approach is to use Git’s built-in submodule feature, which allows you to keep a Git repository as a subdirectory of another repository. This method maintains separate version control for each component while integrating them into your main project.

Read More…

How to remove a remote in Git

Removing a Git remote disconnects your local repository from a remote URL, useful for cleaning up unused remotes or changing repository configuration. As the creator of CoreUI with 26 years of development experience, I’ve managed Git remotes across hundreds of repositories, removing outdated deployment targets and reorganizing remote configurations for optimal workflows.

The fastest way is using git remote remove.

Read More…

How to rename a remote in Git

Renaming a Git remote changes its local reference name without affecting the actual remote repository URL. As the creator of CoreUI with 26 years of development experience, I’ve renamed Git remotes across hundreds of repositories to maintain clear naming conventions and improve team workflow organization.

The fastest way is using git remote rename.

Read More…

How to add Git remote

Adding a Git remote connects your local repository to a remote URL for pushing and pulling changes. As the creator of CoreUI with 26 years of development experience, I’ve configured Git remotes across hundreds of open-source and enterprise projects for collaboration and multi-environment deployments.

The fastest way is using git remote add.

Read More…

How to rename Git remote

Renaming a Git remote updates the local reference name while preserving the remote URL and tracking branches. As the creator of CoreUI with 26 years of development experience, I’ve managed Git remotes across hundreds of repositories where clear naming conventions improved team collaboration.

The fastest way is using git remote rename.

Read More…

How to remove Git remote

Removing a Git remote disconnects your local repository from a remote URL, useful when changing hosting providers or cleaning up old connections. As the creator of CoreUI with 26 years of development experience, I’ve managed Git remotes across hundreds of open-source and enterprise projects.

The fastest way is using git remote remove or its alias git remote rm.

Read More…

How to add a remote in Git

Adding Git remotes allows you to track multiple repositories, sync with upstream projects, and manage forks effectively. As the creator of CoreUI with 25 years of Git experience managing open-source projects with thousands of contributors, I regularly use multiple remotes for collaboration workflows.

The most common command is git remote add <name> <url> to add a new remote repository.

Read More…