Branches
Browse all articles, tutorials, and guides about Branches
Posts
Git Clone a Specific Branch with --single-branch
Clone only one branch with git clone -b branch-name --single-branch <repo-url>. Add --depth 1 to download just the latest commit and save more space.
How to Create a Remote Git Branch
Need to create a branch on the remote repository? Learn how to push local branches to remote and create remote branches directly.
Git Diff Between Two Branches: Files, Commits and Stats
git diff main..feature shows changed lines, git log main..feature lists commits main does not have, and git diff --stat main feature sums it up per file.
How to Move Uncommitted Work to a New Branch in Git
Started working on the wrong branch? Learn how to move your uncommitted changes to a new branch without losing any work.
What Does Cherry-Picking a Commit Mean in Git?
Need to apply a specific commit from one branch to another? Learn how to use git cherry-pick to selectively copy commits without merging entire branches.