this is what i got when tried using it in cmd line
git: 'fork' is not a git command. See 'git --help'.
The most similar command is fsck
this is what i got when tried using it in cmd line
git: 'fork' is not a git command. See 'git --help'.
The most similar command is fsck
A Fork is a GitHub operation, not a Git one.
You can use the GitHub CLI gh fork command to make a fork.
Example:
# Create a fork for another repository.
~/Projects$ gh repo fork cli/cli
- Forking cli/cli...
✓ Created fork cli/cli
? Would you like to clone the fork? Yes
Cloning into 'cli'...
✓ Cloned fork
~/Projects$ cd cli
~/Projects/cli$
That way, you don't have to clone any repository: the forked repository is created and then cloned for you.
This is different from creating a branch inside your own repository.
See also gh repo fork -- fork-name=xxx with gh 2.5.0 (Feb. 2022)
Use hub command line tool that was specifically designed to work with Github. Install it or download it and add it to your PATH and then do:
alias git=hub
You can now do git fork to fork the repository you're currently in. hub also comes
with other useful commands, for example you can do git pull-request
to send a pull request in the command line (do not confuse it with
git-request-pull which is
the built-in Git command)