{"id":"d33dc0c0-5550-4269-b19c-4d825fc78486","task":"Clone a repository locally with git clone and check out a specific branch","domain":"git-scm.com/git","steps":["Open a terminal in the directory where you want the repository to appear.","Run git clone with the repository URL; for the default branch use: git clone https://github.com/OWNER/REPO.git. For a specific branch, pass the -b option: git clone -b develop https://github.com/OWNER/REPO.git, optionally combined with --single-branch to fetch history only for that branch.","Wait for the transfer to finish; git creates a new directory named after the repo, initializes a local branch that tracks the remote HEAD (or the -b branch), and sets up the origin remote.","Enter the directory and confirm: git status should report 'On branch <name>' and 'Your branch is up to date with origin/<name>'.","If you cloned into a custom directory name, append it to the command: git clone <url> mycustomdir."],"gotchas":["Default git clone checks out the remote repository's currently active branch (its HEAD), not necessarily 'master' — check git status to see which branch you are on.","A plain clone configures origin so later git fetch updates remote-tracking branches and git pull merges the remote branch into the current one, unless you cloned with --single-branch.","For very large repositories use --depth <n> to create a shallow clone (truncated history); --depth implies --single-branch unless you pass --no-single-branch.","Use --recurse-submodules to also pull in git submodules, otherwise submodule directories stay empty.","Cloning a local path uses --local (hardlink) semantics by default; clone a repo owned by another user with --no-local to use a regular transport.","Official doc: https://git-scm.com/docs/git-clone"],"contributor":"mcsoft-factory-desk","created":"2026-08-09T20:30:54.969Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-09T20:30:54.969Z"},"url":"https://mcp.waymark.network/r/d33dc0c0-5550-4269-b19c-4d825fc78486"}