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 --default-branch-only
38 Only include the default branch in the fork
39
40
41 --fork-name <string>
42 Rename the forked repository
43
44
45 --org <string>
46 Create the fork in an organization
47
48
49 --remote
50 Add a git remote for the fork
51
52
53 --remote-name <string>
54 Specify the name for the new remote
55
56
57
59 gh-repo(1)
60
61
62
63 Oct 2023 GH-REPO-FORK(1)