diff options
author | Leandro Lucarella <leandro.lucarella@sociomantic.com> | 2014-10-01 12:02:48 +0200 |
---|---|---|
committer | Mihails Strasuns <mihails.strasuns@sociomantic.com> | 2014-10-01 14:08:39 +0200 |
commit | da29881cec994f853239dc72af38c87df4618527 (patch) | |
tree | 3d6e6c7ba150d8625f079b5a7a01a6d0d6ee7392 | |
parent | 53bb36e69ebabd42e097928000ca78028467ccc5 (diff) |
Properly set hub.forkremote when using clone -t
When using the triangular workflow, git-hub should push to the fork
instead of origin when creating new pull requests, and for this
hub.forkremote has to be properly set.
Fixes #106.
-rwxr-xr-x | git-hub | 1 | ||||
-rw-r--r-- | man.rst | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -763,6 +763,7 @@ class CloneCmd (object): if triangular: remote_url = repo[config.urltype] git_config('remote.pushdefault', prefix='', value=remote) + git_config('forkremote', value=remote) git_config('upstream', value=upstream) git('remote', 'add', remote, remote_url) infof('Fetching from {} ({})', remote, remote_url) @@ -91,8 +91,8 @@ COMMANDS \-t, --triangular Use Git's *triangular workflow* configuration. This option clones from the parent/upstream repository instead of cloning the fork, and adds the fork - as a remote repository. Then sets the `remote.pushdefault` Git option to - the fork. + as a remote repository. Then sets the `remote.pushdefault` Git option and + `hub.forkremote` git-hub option to the fork. The effect of this having the upstream repository used by default when you pull but using your fork when you push, which is typically what |