git init
Create a new repository in the current directory, creating a .git folder. Use -b main to set the default branch name; --bare for a shared remote repository.
git init
git init -b main
git init --bare repo.git
DevOps & Cloud · 10 sections
Branching, rebasing, merging, and the Git interview essentials.
Create a new repository in the current directory, creating a .git folder. Use -b main to set the default branch name; --bare for a shared remote repository.
git init
git init -b main
git init --bare repo.git
Copy a remote repository locally, setting up origin and tracking the default branch. --depth 1 makes a shallow clone; --branch selects a tag/branch.
git clone https://github.com/user/repo.git
git clone --depth 1 https://github.com/user/repo.git
git clone --branch v1.0 --single-branch url
Show working tree and staging area state. -s is a human-oriented short format; for scripts use --porcelain (v1) or --porcelain=v2, whose output is guaranteed stable across versions. -b adds branch and tracking info.
git status
git status -s
git status -sb
git status --porcelain
git status --porcelain=v2 --branch
105 more cards in this sheet
Unlock the Cloud, DevOps & CS Fundamentals bundle — ₹399
One-time payment. Unlocks this sheet and 8 other sheets in the bundle, plus a typeset PDF of each.
Unlock the bundle See all bundles
Or get all 76 sheets for ₹999 — one payment, every future sheet included.
What's new and the interview questions people are actually getting asked. No spam.