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

How to squash commits in Git

Squashing commits combines multiple small commits into a single, meaningful commit before merging a feature branch, making the project history clean and easy to navigate. As the creator of CoreUI with 25 years of open-source development experience, I review pull requests daily and always ask contributors to squash work-in-progress commits before merging. The most straightforward method is interactive rebase with git rebase -i, which gives you full control over which commits to squash and what message to use. Clean commit history makes git log, git bisect, and git blame significantly more useful.

Read More…

How to sync fork in Git

When you fork a repository on GitHub, your fork quickly falls behind the original as new commits are merged upstream. As the creator of CoreUI with 25 years of open-source development experience, I sync contributor forks daily across multiple repositories and have refined the process to a few reliable steps. The correct approach is to add the original repository as a remote called upstream, fetch its changes, and merge or rebase them into your local branch. This keeps your fork current and prevents difficult merge conflicts later.

Read More…

How to configure lint-staged in Vue

Running the linter on your entire codebase before every commit is slow and discourages developers from committing often. As the creator of CoreUI with 25 years of experience building large-scale frontend projects, I’ve standardized on lint-staged to run ESLint and Prettier only on the files you actually changed. Combined with Husky git hooks, this setup catches code quality issues automatically without slowing down your workflow. The result is a consistent codebase where every committed file meets your style and quality standards.

Read More…

How to cherry-pick commits in Git

Git cherry-pick applies specific commits from one branch to another without merging the entire branch history. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve used cherry-pick to backport bug fixes to older release branches and bring specific features into hotfix branches. The standard approach identifies the commit hash with git log and applies it with git cherry-pick. This gives surgical control over which changes move between branches.

Read More…

How to mirror push in Git

Mirror pushing copies all refs - branches, tags, and notes - from one repository to another, keeping them in perfect sync. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve used mirror pushes for backup strategies, repository migrations, and maintaining read-only mirrors for different teams. The standard approach adds a secondary remote and pushes with --mirror to replicate everything exactly. This ensures the destination is an exact copy of the source.

Read More…

How to backup a Git repository

Backing up Git repositories protects against data loss, accidental deletions, and hosting outages. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve maintained backup strategies for codebases with years of history and hundreds of contributors. The most reliable approach uses git bundle for portable backups or bare clones for full mirrors, both capturing all branches, tags, and history. A good backup strategy runs automatically on a schedule.

Read More…

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…

How to split submodules in Git

Splitting a Git submodule into multiple smaller submodules helps organize large codebases and manage dependencies more granularly. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve restructured numerous projects where monolithic submodules needed division for better maintainability. The recommended approach uses git filter-branch or git subtree to extract subdirectories into new repositories, then replaces the original submodule with multiple smaller ones. This preserves commit history while improving project organization.

Read More…

How to sync submodules in Git

Keeping Git submodules synchronized with their remote repositories is essential when working on projects with external dependencies. As the creator of CoreUI with over 25 years of version control experience since 2000, I’ve managed complex projects where submodules need frequent updates from upstream changes. The standard approach uses git submodule update --remote to fetch the latest changes from submodule remotes and update local references. This ensures all team members work with the same submodule versions.

Read More…