Shallow clone one branch
Clone only the latest commit of one branch. Good for fast CI checkouts
git clone --depth=1 --single-branch --branch main <url>
More git commands
-
git shortlog -sn --allRank authors by their total number of commits
-
git log --all --grep='fix:' --onelineFind all commits on any branch whose message contains fix:
-
git log -S 'functionName' --patch --allFind when a string was added or removed on any branch, with the diff
-
git clone --filter=blob:none <url>Download commits and trees now. File contents (blobs) are fetched when needed
-
git worktree add ../hotfix-branch hotfix/urgentCheck out a branch in a separate directory and keep your current branch as is