SuperAPI AI Directory

git-fork-clone

Coding & development

View repository

Updated 10-16 09:28

About this skill

Git Fork & Clone

Fork someone else's GitHub repository and clone it locally, automatically configuring the official remote.

Trigger conditions

Use this skill when the user requests to fork someone else's repository and clone it locally.

Input

The user needs to provide the target repository, in the format owner/repo。

Execution steps

  1. Fork the repository: Use gh repo fork <owner/repo> --clone=false to fork the repository to the zc277584121 account.
  2. Clone the repository: Use gh repo clone zc277584121/<repo> to clone the forked repository locally.
  3. Enter the project directory:cd <repo>。
  4. Add the official remote:git remote add official https://github.com/<original-owner>/<repo>.git, used to track the upstream repository.
  5. Verify the remote configuration:git remote -v, confirming that origin points to your own fork and official points to the original repository.

Notes

  • If the fork already exists,gh repo fork will automatically skip the fork step.
  • Always use official as the upstream remote name (rather than upstream), to maintain consistency.
  • After cloning is complete, report the remote configuration result to the user.