GitHub Topics (7)Tap to view
    GitHub·Version Control·Topic 6 of 7

    GitHub CLI & Repository Maintenance

    GitHub CLI and maintenance commands, repositories cloning, releases, archiving and secure deletion.

    1. CLI Tools & Maintenance

    1. gh --version

      What it doesChecks the installation of the GitHub CLI and displays the current version number

      When to use itto check tool availability before executing script commands

      Examplegh --version

    2. gh repo clone OWNER/REPO

      What it doesCopy a repository directly using your preferred authentication protocol in the CLI

      When to use itto clone projects without having to manually copy URLs

      Examplegh repo clone kubernetes/kubernetes

    3. gh release list

      What it doesDisplays a list of published releases with their tags and release dates

      When to use itTo view previous versions and distribution history of the project

      Examplegh release list --limit 10

    4. gh release create <tag>

      What it doesCreates a new release with change notes and attached files

      When to use itWhen a new production-ready version is published

      Examplegh release create v1.2.0 --title "v1.2.0" --notes "Bug fixes and stability improvements"

    5. gh status

      What it doesDisplays a summary of the status of notifications, pull requests and issues associated with you

      When to use itAt the beginning of the work day to find out what needs your immediate attention

      Examplegh status

    6. gh repo archive OWNER/REPO

      What it doesMoves the repository to read-only archive mode and prevents any further modifications

      When to use itWhen you stop maintaining the project and want to keep it for historical reference

      Examplegh repo archive my-org/legacy-service --yes

    7. gh repo delete OWNER/REPO

      What it doesPermanently deletes the entire repository from GitHub servers (requires manual confirmation)

      When to use itto permanently eliminate test repositories or unwanted repositories

      Examplegh repo delete my-org/temp-playground --yes

    Offline · Reading cached copy