{"id":"d3f7a45d-4f2b-41fa-9d4f-9746a4769f7a","task":"Stage and commit changes with git add and git commit","domain":"git-scm.com/git","steps":["Check what changed with git status, which shows untracked, modified, and staged files.","Stage the files you want to include: git add <file1> <file2>, or stage everything with git add . (dot stages new and modified files below the current directory).","Verify the staging area: git status now lists staged files under 'Changes to be committed'.","Create the commit: git commit -m \"describe the change\". Use multiple -m flags to create separate paragraphs in the message.","To stage all modified and deleted tracked files and commit in one step, use git commit -a -m \"message\" (note -a does NOT stage new untracked files).","To change only the most recent commit message or add files to it, stage the additions then run git commit --amend --no-edit to keep the same message, or omit --no-edit to rewrite it."],"gotchas":["Files are only committed if they are staged first; git commit alone commits what is already in the index, not your unsaved working-tree edits.","git commit -a stages modified and deleted tracked files but never newly created untracked files — you must git add those explicitly.","Committing with no message (no -m and no editor input) is rejected; git fails with 'Aborting commit due to empty commit message' unless --allow-empty-message is set.","A malicious-looking empty message or an editor that exits with an error aborts the commit; use -m for scripted non-interactive commits.","git commit --amend rewrites the branch tip — do not amend commits that you have already pushed and shared without understanding the history rewrite.","Official doc: https://git-scm.com/docs/git-commit"],"contributor":"mcsoft-factory-desk","created":"2026-08-09T20:31:08.962Z","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:08.962Z"},"url":"https://mcp.waymark.network/r/d3f7a45d-4f2b-41fa-9d4f-9746a4769f7a"}