diff --git a/man/git-fork.1 b/man/git-fork.1 index ed46a50..c27cddb 100644 --- a/man/git-fork.1 +++ b/man/git-fork.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "GIT\-FORK" "1" "December 2015" "" "" +.TH "GIT\-FORK" "1" "July 2016" "" "Git Extras" . .SH "NAME" \fBgit\-fork\fR \- Fork a repo on github @@ -10,7 +10,7 @@ \fBgit\-fork\fR [] . .SH "DESCRIPTION" -Fork the given github repo\. Like clone but forks first\. +If a github repo url is given, fork the repo\. Like clone but forks first\. . .IP "1." 4 forks the repo on github @@ -23,6 +23,20 @@ adds the original repo as a remote called upstream . .IP "" 0 . +.P +If a url is not given and the current dir is a github repo, fork the repo\. +. +.IP "1." 4 +forks the current repo +. +.IP "2." 4 +rename the \'origin\' remote repo to \'upstream\' +. +.IP "3." 4 +adds the forked repo as a remote called origin +. +.IP "" 0 +. .SH "EXAMPLE" Fork expect\.js: . @@ -69,6 +83,19 @@ $ cd expect\.js && git remote \-v . .IP "" 0 . +.P +If the current dir is a clone of expect\.js, this has the same effect: +. +.IP "" 4 +. +.nf + +$ git fork +. +.fi +. +.IP "" 0 +. .SH "AUTHOR" Written by Andrew Griffiths <\fImail@andrewgriffithsonline\.com\fR> . diff --git a/man/git-fork.html b/man/git-fork.html index 4d8624b..e69de29 100644 --- a/man/git-fork.html +++ b/man/git-fork.html @@ -1,136 +0,0 @@ - - - - - - git-fork(1) - Fork a repo on github - - - - -
- - - -
    -
  1. git-fork(1)
  2. -
  3. -
  4. git-fork(1)
  5. -
- -

NAME

-

- git-fork - Fork a repo on github -

- -

SYNOPSIS

- -

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

- -

DESCRIPTION

- -

Fork the given github repo. Like clone but forks first.

- -
    -
  1. forks the repo on github
  2. -
  3. clones the repo into the current dir
  4. -
  5. adds the original repo as a remote called upstream
  6. -
- - -

EXAMPLE

- -

Fork expect.js:

- -
$ git fork https://github.com/LearnBoost/expect.js
-
- -

or just:

- -
$ git fork LearnBoost/expect.js
-
- -

Then:

- -
$ ..<forks into your github profile and clones repo locally to expect.js dir>...
-
-$ cd expect.js && git remote -v
-
-  origin          https://github.com/<user>/expect.js (fetch)
-  origin          https://github.com/<user>/expect.js (push)
-  upstream        https://github.com/LearnBoost/expect.js (fetch)
-  upstream        https://github.com/LearnBoost/expect.js (push)
-
- -

AUTHOR

- -

Written by Andrew Griffiths <mail@andrewgriffithsonline.com>

- -

REPORTING BUGS

- -

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

- -

SEE ALSO

- -

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

- - -
    -
  1. -
  2. December 2015
  3. -
  4. git-fork(1)
  5. -
- -
- - diff --git a/man/git-fork.md b/man/git-fork.md index 8c0a63b..523a1d5 100644 --- a/man/git-fork.md +++ b/man/git-fork.md @@ -7,12 +7,18 @@ git-fork(1) -- Fork a repo on github ## DESCRIPTION - Fork the given github repo. Like clone but forks first. + If a github repo url is given, fork the repo. Like clone but forks first. 1. forks the repo on github 2. clones the repo into the current dir 3. adds the original repo as a remote called upstream + If a url is not given and the current dir is a github repo, fork the repo. + + 1. forks the current repo + 3. rename the 'origin' remote repo to 'upstream' + 3. adds the forked repo as a remote called origin + ## EXAMPLE Fork expect.js: @@ -34,6 +40,10 @@ git-fork(1) -- Fork a repo on github upstream https://github.com/LearnBoost/expect.js (fetch) upstream https://github.com/LearnBoost/expect.js (push) + If the current dir is a clone of expect.js, this has the same effect: + + $ git fork + ## AUTHOR