Clone with limited depth
Clone only the latest commit of one branch (fast CI checkout)
git clone --depth=1 --single-branch --branch main <url>
More git commands
-
git shortlog -sn --allRanked list of authors by total commit count
-
git log --all --grep='fix:' --onelineFind all commits whose message contains a pattern
-
git log -S 'functionName' --patch --allFind when a string was added or removed across all branches
-
git clone --filter=blob:none <url>Download commits and trees; blobs fetched on-demand (fast)
-
git worktree add ../hotfix-branch hotfix/urgentCheck out a branch in a separate directory without switching