- Loading...
git-defpath creates additional remotes for a Git repository. Remotes that can be setup includes ssh-based push paths, remotes for upstream repositories and forks. This is a Git port of the OpenJDK Code Tools defpath.
$ git defpath -h
usage: git-defpath [options] [<PEER>] [<PEER-PUSH>]
-u, --username NAME username for push URL
-r, --remote URI remote for which to set paths
-s, --secondary URL secondary peer repository base URL
-m, --mercurial Deprecated: force use of mercurial
-d, --default use current default path to compute push path
--upstream create remote 'upstream' for the upstream repository
--fork create remote 'fork' for the personal fork of the repository
-g, --gated create gated push URL
-n, --dry-run do not perform actions, just print output
-v, --version Print the version of this tool
-h, --help Show this help text
Configure an SSH based push path for a repository cloned via HTTP(S):
$ git defpath -d
Configure a remote named "upstream" for the upstream repository for a personal fork:
$ git defpath --upstream
Configure a remote named "fork" for the personal fork of an upstream repository:
$ git defpath --fork
Configure the default value for the --username flag (to "ehelin" in the below example):
$ git configure --global defpath.username ehelin
Configure git-defpath to always compute the push path based on the pull path:
$ git configure --global defpath.default true
See GitDefpath.java.