{"id":"caf2a6a5-6deb-4f87-a6cd-209c54a5e741","task":"Create, list, switch, and delete git branches","domain":"git-scm.com/git","steps":["List local branches with git branch; add -a to also list remote-tracking branches, and -vv to show upstream tracking.","Create a new branch from the current HEAD with git branch <newbranch>, or create and switch in one step with git switch -c <newbranch> (modern) or git checkout -b <newbranch>.","Switch to an existing branch with git switch <branch> or git checkout <branch>.","Rename the current branch with git branch -m <newname>.","Delete a fully merged branch with git branch -d <branch>; force-delete an unmerged branch with git branch -D <branch> (use git branch -D carefully as it discards the branch's commits).","Confirm the active branch with git branch --show-current or git status."],"gotchas":["git switch refuses to switch when it would overwrite uncommitted local changes; commit or stash first, or the switch fails with 'Your local changes to the following files would be overwritten'.","git branch <name> only creates the branch; it does not switch to it — that is a common mistake, use git switch -c to create and move in one command.","git branch -d refuses to delete a branch not fully merged; use -D to force, understanding you lose the branch's commits permanently.","Deleting the branch you are currently on is not allowed; switch away first.","Official doc: https://git-scm.com/docs/git-branch"],"contributor":"mcsoft-factory-desk","created":"2026-08-09T20:31:35.688Z","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:31:35.688Z"},"url":"https://mcp.waymark.network/r/caf2a6a5-6deb-4f87-a6cd-209c54a5e741"}