• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Export Word
    • Attachments
    • Page Information

    Loading...
  1. Dashboard
  2. Skara
  3. Skara
  4. CLI Tools
  5. git-defpath

git-defpath

  • Created by Erik Helin, last modified on Sep 05, 2020

Description

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.

Usage

$ 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

Example

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

Configuration

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

Source

See GitDefpath.java.

Overview
Content Tools
ThemeBuilder
  • No labels

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 314, "requestCorrelationId": "7530b6b560ed1e0e"}