1GIT-FORK(1)                       Git Extras                       GIT-FORK(1)
2
3
4

NAME

6       git-fork - Fork a repo on github
7

SYNOPSIS

9       git-fork [<github-repo-url>]
10

DESCRIPTION

12       If  a  github  repo  url  is given, fork the repo. Like clone but forks
13       first.
14
15       1.  forks the repo on github
16
17       2.  clones the repo into the current dir
18
19       3.  adds the original repo as a remote called upstream
20
21
22
23       If a url is not given and the current dir is a github  repo,  fork  the
24       repo.
25
26       1.  forks the current repo
27
28       2.  rename the origin remote repo to upstream
29
30       3.  adds the forked repo as a remote called origin
31
32
33
34       Remotes  will  use  ssh  if you have it configured with GitHub, if not,
35       https will be used.
36

EXAMPLE

38       Fork expect.js:
39
40
41
42           $ git fork https://github.com/LearnBoost/expect.js
43
44
45
46       or just:
47
48
49
50           $ git fork LearnBoost/expect.js
51
52
53
54       Then:
55
56
57
58           $ ..<forks into your github profile and clones repo locally to expect.js dir>...
59
60           $ cd expect.js && git remote -v
61
62             origin          git@github.com:<user>/expect.js (fetch)
63             origin          git@github.com:<user>/expect.js (push)
64             upstream        git@github.com:LearnBoost/expect.js (fetch)
65             upstream        git@github.com:LearnBoost/expect.js (push)
66
67
68
69       If the current dir is a clone of expect.js, this has the same effect:
70
71
72
73           $ git fork
74
75
76

AUTHOR

78       Written by Andrew Griffiths <mail@andrewgriffithsonline.com>
79

REPORTING BUGS

81       <https://github.com/tj/git-extras/issues>
82

SEE ALSO

84       <https://github.com/tj/git-extras>
85
86
87
88                                 October 2017                      GIT-FORK(1)
Impressum