1GH-REPO-FORK(1) GitHub CLI manual GH-REPO-FORK(1)
2
3
4
6 gh-repo-fork - Create a fork of a repository
7
8
9
11 gh repo fork [<repository>] [-- <gitflags>...] [flags]
12
13
14
16 Create a fork of a repository.
17
18
19 With no argument, creates a fork of the current repository. Otherwise,
20 forks the specified repository.
21
22
23 By default, the new fork is set to be your "origin" remote and any ex‐
24 isting origin remote is renamed to "upstream". To alter this behavior,
25 you can set a name for the new fork's remote with --remote-name.
26
27
28 Additional git clone flags can be passed after --.
29
30
31
33 --clone
34 Clone the fork
35
36
37 --fork-name <string>
38 Rename the forked repository
39
40
41 --org <string>
42 Create the fork in an organization
43
44
45 --remote
46 Add a git remote for the fork
47
48
49 --remote-name <string>
50 Specify the name for the new remote
51
52
53
55 gh-repo(1)
56
57
58
59 Jun 2022 GH-REPO-FORK(1)