[
  {
    "id": "quick_commit_push",
    "type": "tutorial",
    "topic": "quickstart",
    "title": "Commit and push normal changes",
    "question": "What is the standard edit, commit, and push sequence?",
    "tags": [
      "daily",
      "add",
      "commit",
      "push",
      "workflow"
    ],
    "content_md": "After editing and testing:\n\n```bash\ngit status\ngit add -A\ngit commit -m \"Describe the change\"\ngit push\n```\n\nUse `git add file1 file2` instead of `git add -A` when you only want selected files in the commit.",
    "source": "Session Q&A"
  },
  {
    "id": "quick_check",
    "type": "cheat",
    "topic": "quickstart",
    "title": "Quick safety check before pull or push",
    "question": "What should I check before synchronizing?",
    "tags": [
      "status",
      "branch",
      "upstream",
      "safety",
      "pull",
      "push"
    ],
    "content_md": "```bash\ngit status\ngit branch --show-current\ngit rev-parse --abbrev-ref @{u}\n```\n\nThis shows uncommitted work, the current branch, and its tracking branch.",
    "source": "Session Q&A"
  },
  {
    "id": "quick_release",
    "type": "tutorial",
    "topic": "quickstart",
    "title": "Release a tested version",
    "question": "What is the short recipe for a new release?",
    "tags": [
      "release",
      "VERSION",
      "tag",
      "bump",
      "push"
    ],
    "content_md": "After release changes are committed and tested:\n\n```bash\n./git-bump-version 3.0.0\ngit push origin main\ngit push origin --tags\n```\n\nThe helper updates `VERSION`, commits it, and creates tag `v3.0.0`. The two pushes publish the branch and tag.",
    "source": "Session Q&A"
  },
  {
    "id": "quick_start_work",
    "type": "tutorial",
    "topic": "quickstart",
    "title": "Start a normal work session",
    "question": "What commands should I run before editing?",
    "tags": [
      "daily",
      "pull",
      "main",
      "status",
      "workflow"
    ],
    "content_md": "From a working copy:\n\n```bash\ngit status\ngit checkout main\ngit pull\n```\n\nResolve, commit, stash, or discard uncommitted work before pulling if Git reports a conflict or refuses to merge.",
    "source": "Session Q&A"
  },
  {
    "id": "setup_clone",
    "type": "tutorial",
    "topic": "setup",
    "title": "Clone current project from the SSH server",
    "question": "How do I get the current version of a project from the remote repository?",
    "tags": [
      "clone",
      "ssh",
      "remote",
      "current version",
      "macos",
      "linux"
    ],
    "content_md": "Use the `ssh://` URL form so the custom port is included:\n\n```bash\nmkdir -p ~/projects\ncd ~/projects\ngit clone ssh://intel145@209.182.212.74:2222/home/intel145/websites/gitrepo/proj1.git proj1\ncd proj1\n```\n\nVerify:\n\n```bash\ngit remote -v\ngit branch -a\ncat VERSION\ngit describe --tags --always\n```",
    "source": "faq4.md"
  },
  {
    "id": "setup_ssh",
    "type": "task",
    "topic": "setup",
    "title": "Confirm SSH access to the Git server",
    "question": "How do I confirm SSH works before using Git?",
    "tags": [
      "ssh",
      "server",
      "port 2222",
      "key",
      "connection"
    ],
    "content_md": "Run from macOS or another Linux client:\n\n```bash\nssh -p 2222 intel145@209.182.212.74 'echo SSH_OK'\n```\n\nIf it prints `SSH_OK`, SSH connectivity works. Git over SSH will not work until this succeeds.",
    "source": "tasks.md"
  },
  {
    "id": "remote_add_syntax",
    "type": "faq",
    "topic": "remote",
    "title": "Correct SSH remote syntax with port 2222",
    "question": "What was wrong with git remote add origin ssh -p 2222 user@host -i key?",
    "tags": [
      "remote add",
      "ssh",
      "port",
      "2222",
      "identity file",
      "url"
    ],
    "content_md": "`git remote add` accepts a remote name and one URL. SSH options such as `-p` and `-i` are not separate Git remote arguments. Use:\n\n```bash\ngit remote add origin ssh://intel145@209.182.212.74:2222/home/intel145/websites/gitrepo/proj1.git\n```\n\nConfigure the identity file in `~/.ssh/config` or use `GIT_SSH_COMMAND` when needed.",
    "source": "Session Q&A"
  },
  {
    "id": "remote_origin_meaning",
    "type": "glossary",
    "topic": "remote",
    "title": "Meaning of git remote add origin",
    "question": "What does git remote add origin mean?",
    "tags": [
      "origin",
      "remote add",
      "alias",
      "url"
    ],
    "content_md": "The command stores a named connection from the local working copy to another repository:\n\n```bash\ngit remote add origin <url>\n```\n\n`origin` is a conventional nickname. `git push origin main` means push local `main` to the repository named `origin`.",
    "source": "Session Q&A"
  },
  {
    "id": "versions_release",
    "type": "tutorial",
    "topic": "versions",
    "title": "Make changes and release v3.0.0",
    "question": "How do I get current files, make changes, make v3.0.0, and update the server?",
    "tags": [
      "release",
      "v3.0.0",
      "VERSION",
      "tag",
      "push",
      "workflow"
    ],
    "content_md": "```bash\ngit checkout main\ngit pull\n# edit and test files\ngit add -A\ngit commit -m 'Implement v3 features'\n./git-bump-version 3.0.0\ngit push origin main\ngit push origin --tags\n```\n\nThe script updates `VERSION`, commits it, and creates `v3.0.0`.",
    "source": "faq4.md"
  },
  {
    "id": "versions_tags",
    "type": "faq",
    "topic": "versions",
    "title": "When to use tags",
    "question": "When should I use tags?",
    "tags": [
      "tag",
      "release",
      "version",
      "milestone",
      "v1",
      "v2"
    ],
    "content_md": "Use tags to mark fixed release or milestone commits such as `v1.0.0`, `v2.0.0`, and `v2.1.0`. A branch is for ongoing development; a tag is a named snapshot that should normally remain unchanged.\n\n```bash\ngit tag -a v2.0.0 -m 'Release v2.0.0'\ngit push origin --tags\n```",
    "source": "faq1.md"
  },
  {
    "id": "branches_list",
    "type": "cheat",
    "topic": "branches",
    "title": "List local, remote, and all branches",
    "question": "How do I list branches?",
    "tags": [
      "branch",
      "list",
      "local",
      "remote",
      "all"
    ],
    "content_md": "```bash\ngit branch       # local branches\ngit branch -r    # remote-tracking branches\ngit branch -a    # local and remote-tracking branches\n```\n\nUse `git fetch origin --prune` first if you need fresh remote branch information.",
    "source": "Session Q&A"
  },
  {
    "id": "branches_current",
    "type": "cheat",
    "topic": "branches",
    "title": "Show the current branch",
    "question": "How do I check which branch I am currently on?",
    "tags": [
      "current branch",
      "show current",
      "HEAD"
    ],
    "content_md": "```bash\ngit branch --show-current\n```\n\nAlternatives: `git branch`, `git rev-parse --abbrev-ref HEAD`, or `git status`. `git branch` marks the current branch with `*`.",
    "source": "Session Q&A"
  },
  {
    "id": "files_diff",
    "type": "cheat",
    "topic": "files",
    "title": "Compare README.md between v1 and v2",
    "question": "How do I compare README.md in v1 versus v2?",
    "tags": [
      "diff",
      "README.md",
      "v1",
      "v2",
      "compare"
    ],
    "content_md": "```bash\ngit --no-pager diff v1 v2 -- README.md\n```\n\nUse full tag names such as `v1.0.0` and `v2.0.0` if that is how your tags are named.",
    "source": "Session Q&A"
  },
  {
    "id": "files_status",
    "type": "cheat",
    "topic": "files",
    "title": "List edited, staged, and untracked files",
    "question": "How do I see files being edited or checked out?",
    "tags": [
      "status",
      "modified",
      "staged",
      "untracked",
      "files"
    ],
    "content_md": "```bash\ngit status\n```\n\nIt groups files into staged changes, unstaged changes, and untracked files. Use it before committing, pulling, or pushing.",
    "source": "Session Q&A"
  },
  {
    "id": "files_get_old",
    "type": "cheat",
    "topic": "files",
    "title": "View or save README.md from v1",
    "question": "How do I get v1 of README.md without changing current files?",
    "tags": [
      "show",
      "old version",
      "README.md",
      "tag",
      "export"
    ],
    "content_md": "View:\n\n```bash\ngit show v1:README.md\n```\n\nSave separately:\n\n```bash\ngit show v1:README.md > README.v1.md\n```\n\nThis does not alter the current working copy.",
    "source": "Session Q&A"
  }
]