remote
NAME名
git-remote - Manage set of tracked repositoriesgit-remote - 追跡リポジトリのセットを管理する
SYNOPSIS概要
git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> git remote rename <old> <new> git remote remove <name> git remote set-head <name> (-a | --auto | -d | --delete | <branch>) git remote set-branches [--add] <name> <branch>… git remote get-url [--push] [--all] <name> git remote set-url [--push] <name> <newurl> [<oldurl>] git remote set-url --add [--push] <name> <newurl> git remote set-url --delete [--push] <name> <url> git remote [-v | --verbose] show [-n] <name>… git remote prune [-n | --dry-run] <name>… git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)…]
DESCRIPTION説明
Manage the set of repositories ("remotes") whose branches you track.ブランチを追跡している一連のリポジトリ( "remotes")を管理します。
OPTIONSオプション
- -v
- --verbose - 冗談
-
Be a little more verbose and show remote url after name. NOTE: This must be placed between
remote
andsubcommand
.もう少し冗長にして、名前の後にリモートURLを表示します。注:これはとの間に配置する必要がremote
ありsubcommand
ます。
COMMANDSコマンド
With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes.引数なしで、既存のリモートの一覧を表示します。リモートに対して操作を実行するためのサブコマンドがいくつかあります。
- add 追加する
-
Adds a remote named <name> for the repository at <url>. The command
git fetch <name>
can then be used to create and update remote-tracking branches <name>/<branch>.<url>のリポジトリに<name>という名前のリモートを追加します。このコマンドgit fetch <name>
を使用して、リモートトラッキングブランチ<名前> / <ブランチ>を作成および更新できます。With
-f
option,git fetch <name>
is run immediately after the remote information is set up.では-f
オプション、git fetch <name>
遠隔情報が設定された直後に実行されます。With
--tags
option,git fetch <name>
imports every tag from the remote repository.では--tags
オプション、git fetch <name>
リモートリポジトリからすべてのタグをインポートします。With
--no-tags
option,git fetch <name>
does not import tags from the remote repository.では--no-tags
オプション、git fetch <name>
リモートリポジトリからタグをインポートしません。By default, only tags on fetched branches are imported (see git-fetch[1]).デフォルトでは、取得したブランチのタグのみがインポートされます(git-fetch [1]を参照)。
With
-t <branch>
option, instead of the default glob refspec for the remote to track all branches under therefs/remotes/<name>/
namespace, a refspec to track only<branch>
is created. You can give more than one-t <branch>
to track multiple branches without grabbing all branches.では-t <branch>
オプション、代わりに下のすべてのブランチを追跡するために、リモートのデフォルトのグロブrefspecのrefs/remotes/<name>/
名前空間のみ追跡するrefspecが<branch>
作成されます。あなたは、1以上のものを与えることができ-t <branch>
、すべての枝をつかむことなく、複数のブランチを追跡します。With
-m <master>
option, a symbolic-refrefs/remotes/<name>/HEAD
is set up to point at remote’s<master>
branch. See also the set-head command.では-m <master>
オプション、シンボリック-refはrefs/remotes/<name>/HEAD
、リモートのを指すように設定されている<master>
ブランチ。set-headコマンドも参照してください。When a fetch mirror is created with
--mirror=fetch
, the refs will not be stored in the refs/remotes/ namespace, but rather everything in refs/ on the remote will be directly mirrored into refs/ in the local repository. This option only makes sense in bare repositories, because a fetch would overwrite any local commits.でミラーを作成する--mirror=fetch
と、refはrefs / remotes /名前空間に格納されませんが、リモートのrefs /内のすべては直接ローカルリポジトリ内のrefs /にミラーリングされます。このオプションは裸のリポジトリでのみ意味があります。なぜなら、フェッチはローカルコミットを上書きするからです。When a push mirror is created with
--mirror=push
, thengit push
will always behave as if--mirror
was passed.でプッシュミラーを作成すると--mirror=push
、git push
常に--mirror
渡されたように動作します。 - rename リネーム
-
Rename the remote named <old> to <new>. All remote-tracking branches and configuration settings for the remote are updated.<old>という名前のリモートの名前を<new>に変更します。リモートのすべてのリモート追跡ブランチと構成設定が更新されます。
In case <old> and <new> are the same, and <old> is a file under
$GIT_DIR/remotes
or$GIT_DIR/branches
, the remote is converted to the configuration file format.<old>と<new>が同じで、<old>が$GIT_DIR/remotes
または以下のファイルの場合$GIT_DIR/branches
、リモートは設定ファイル形式に変換されます。 - remove 削除する
- rm RM
-
Remove the remote named <name>. All remote-tracking branches and configuration settings for the remote are removed.<名前>という名前のリモートを削除します。リモート追跡ブランチとそのリモートの構成設定はすべて削除されます。
- set-head セットヘッド
-
Sets or deletes the default branch (i.e. the target of the symbolic-ref
refs/remotes/<name>/HEAD
) for the named remote. Having a default branch for a remote is not required, but allows the name of the remote to be specified in lieu of a specific branch. For example, if the default branch fororigin
is set tomaster
, thenorigin
may be specified wherever you would normally specifyorigin/master
.refs/remotes/<name>/HEAD
名前付きremote のデフォルトブランチ(すなわちsymbolic-refのターゲット)を設定または削除します。リモート用のデフォルトのブランチを持つことは必須ではありませんが、特定のブランチの代わりにリモートの名前を指定することを可能にします。たとえば、デフォルトのブランチは、場合origin
に設定されmaster
、その後、origin
あなたは通常、指定しますどこに指定することができますorigin/master
。With
-d
or--delete
, the symbolic refrefs/remotes/<name>/HEAD
is deleted.と-d
や--delete
、シンボリックrefがrefs/remotes/<name>/HEAD
削除されます。With
-a
or--auto
, the remote is queried to determine itsHEAD
, then the symbolic-refrefs/remotes/<name>/HEAD
is set to the same branch. e.g., if the remoteHEAD
is pointed atnext
, "git remote set-head origin -a
" will set the symbolic-refrefs/remotes/origin/HEAD
torefs/remotes/origin/next
. This will only work ifrefs/remotes/origin/next
already exists; if not it must be fetched first.と-a
や--auto
、リモートは、その決定をするために照会されHEAD
、その後、シンボリック-refはrefs/remotes/<name>/HEAD
同じ枝に設定されています。たとえば、リモートHEAD
が指しているnext
場合、 "git remote set-head origin -a
"はsymbolic-refrefs/remotes/origin/HEAD
をに設定しrefs/remotes/origin/next
ます。これはrefs/remotes/origin/next
既に存在する場合にのみ機能します。そうでない場合は、最初にフェッチする必要があります。Use
<branch>
to set the symbolic-refrefs/remotes/<name>/HEAD
explicitly. e.g., "git remote set-head origin master" will set the symbolic-refrefs/remotes/origin/HEAD
torefs/remotes/origin/master
. This will only work ifrefs/remotes/origin/master
already exists; if not it must be fetched first.<branch>
記号参照をrefs/remotes/<name>/HEAD
明示的に設定するために使用します。例えば、 "git remote set-head origin master"はsymbolic-refrefs/remotes/origin/HEAD
をに設定しrefs/remotes/origin/master
ます。これはrefs/remotes/origin/master
既に存在する場合にのみ機能します。そうでない場合は、最初にフェッチする必要があります。 - set-branches セットブランチ
-
Changes the list of branches tracked by the named remote. This can be used to track a subset of the available remote branches after the initial setup for a remote.指定されたremoteによって追跡されているブランチのリストを変更します。これは、リモートの初期設定後に利用可能なリモートブランチのサブセットを追跡するために使用できます。
The named branches will be interpreted as if specified with the
-t
option on the git remote add command line.名前付きブランチは-t
、git remote addコマンドラインのオプションで指定されたものとして解釈されます。With
--add
, instead of replacing the list of currently tracked branches, adds to that list.では--add
、代わりに現在追跡ブランチのリストを交換すると、そのリストに追加されます。 - get-url 取得URL
-
Retrieves the URLs for a remote. Configurations for
insteadOf
andpushInsteadOf
are expanded here. By default, only the first URL is listed.リモートのURLを取得します。の設定insteadOf
とpushInsteadOf
ここで展開されています。デフォルトでは、最初のURLだけがリストされています。With
--push
, push URLs are queried rather than fetch URLs.では--push
、プッシュURLはURLを取得するのではなく照会されます。With
--all
, all URLs for the remote will be listed.では--all
、リモートのすべてのURLが一覧表示されます。 - set-url
-
Changes URLs for the remote. Sets first URL for remote <name> that matches regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If <oldurl> doesn’t match any URL, an error occurs and nothing is changed.リモートのURLを変更します。正規表現<oldurl>に一致するリモート<name>の最初のURL(<oldurl>が指定されていない場合は最初のURL)を<newurl>に設定します。<oldurl>がどのURLとも一致しない場合、エラーが発生し、何も変更されません。
With
--push
, push URLs are manipulated instead of fetch URLs.では--push
、URLを取得する代わりにプッシュURLを操作します。With
--add
, instead of changing existing URLs, new URL is added.では--add
、既存のURLを変更する代わりに、新しいURLが追加されます。With
--delete
, instead of changing existing URLs, all URLs matching regex <url> are deleted for remote <name>. Trying to delete all non-push URLs is an error.では--delete
、既存のURLを変更する代わりに、正規表現<url>に一致するすべてのURLがリモート<名前>に対して削除されます。プッシュされていないURLをすべて削除しようとするとエラーになります。Note that the push URL and the fetch URL, even though they can be set differently, must still refer to the same place. What you pushed to the push URL should be what you would see if you immediately fetched from the fetch URL. If you are trying to fetch from one place (e.g. your upstream) and push to another (e.g. your publishing repository), use two separate remotes.プッシュURLとフェッチURLは別々に設定することができますが、それでも同じ場所を参照する必要があります。プッシュURLにプッシュしたものは、すぐに取得URLから取得した場合に表示されるはずです。ある場所(たとえば上流)から取り出して別の場所(たとえばあなたの公開リポジトリ)にプッシュしようとしている場合は、2つの別々のリモートを使用してください。
- show 見せる
-
Gives some information about the remote <name>.リモート<名前>に関する情報を提供します。
With
-n
option, the remote heads are not queried first withgit ls-remote <name>
; cached information is used instead.では-n
オプション、リモートヘッドはと最初に照会されていませんgit ls-remote <name>
。代わりにキャッシュされた情報が使用されます。 - prune プルーン
-
Deletes stale references associated with <name>. By default, stale remote-tracking branches under <name> are deleted, but depending on global configuration and the configuration of the remote we might even prune local tags that haven’t been pushed there. Equivalent to
git fetch --prune <name>
, except that no new references will be fetched.<name>に関連付けられている古い参照を削除します。デフォルトでは、<name>の下にある古いリモート追跡ブランチは削除されますが、グローバル設定とリモートの設定によっては、プッシュされていないローカルタグを削除することもあります。同等にgit fetch --prune <name>
、新しい参照がフェッチされないことを除いて。See the PRUNING section of git-fetch[1] for what it’ll prune depending on various configuration.さまざまな設定によって何が剪定されるのかについてはgit-fetch [1]のPRUNINGセクションを参照してください。
With
--dry-run
option, report what branches will be pruned, but do not actually prune them.では--dry-run
オプション、枝が剪定されるかを報告しますが、実際にそれらを整理しません。 - update 更新
-
Fetch updates for remotes or remote groups in the repository as defined by remotes.<group>. If neither group nor remote is specified on the command line, the configuration parameter remotes.default will be used; if remotes.default is not defined, all remotes which do not have the configuration parameter remote.<name>.skipDefaultUpdate set to true will be updated. (See git-config[1]).remotes。<group>で定義されているように、リポジトリ内のリモートまたはリモートグループの更新を取得します。コマンドラインでgroupもremoteも指定されていない場合は、設定パラメータremotes.defaultが使用されます。remotes.defaultが定義されていない場合は、設定パラメータremote。<name> .skipDefaultUpdateがtrueに設定されていないすべてのリモートが更新されます。(git-config [1]を見てください)。
With
--prune
option, run pruning against all the remotes that are updated.では--prune
オプション、更新されているすべてのリモートに対する剪定を実行します。
DISCUSSION討論
The remote configuration is achieved using the remote.origin.url
and
remote.origin.fetch
configuration variables. (See
git-config[1]).リモート設定はremote.origin.url
and remote.origin.fetch
設定変数を使って実現されます。(git-config [1]を見てください)。
EXAMPLES例
-
Add a new remote, fetch, and check out a branch from it新しいリモートを追加し、それを取り出してブランチをチェックアウトする
$ git remote origin $ git branch -r origin/HEAD -> origin/master origin/master $ git remote add staging git://git.kernel.org/.../gregkh/staging.git $ git remote origin staging $ git fetch staging ... From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging * [new branch] master -> staging/master * [new branch] staging-linus -> staging/staging-linus * [new branch] staging-next -> staging/staging-next $ git branch -r origin/HEAD -> origin/master origin/master staging/master staging/staging-linus staging/staging-next $ git checkout -b staging staging/master ...
-
Imitate git clone but track only selected branchesgitクローンを模倣するが選択したブランチだけを追跡する
$ mkdir project.git $ cd project.git $ git init $ git remote add -f -t master -m master origin git://example.com/git.git/ $ git merge origin
SEE ALSO関連項目
git-fetch[1] git-branch[1] git-config[1]git-fetch [1] git-branch [1] git-config [1]
GIT
Part of the git[1] suite一部のgit [1]スイート
関連記事
- write-tree
- verify-pack
- update-ref
- update-index
- symbolic-ref
- show-ref
- rev-parse
- rev-list
- read-tree
- merge-base
- ls-files
- hash-object
- for-each-ref
- diff-index
- count-objects
- commit-tree
- checkout-index
- check-ignore
- cat-file
- bundle
- archive
- instaweb
- filter-branch
- reflog
- fsck
- gc
- clean
- Workflows
- Tutorial
- Revisions
- gitmodules
- gitignore
- githooks
- Glossary
- Everyday Git
- gitattributes
- update-server-info
- daemon
- fast-import
- svn
- request-pull
- send-email
- format-patch
- am
- grep
- blame
- bisect
- revert
- rebase
- cherry-pick
- apply
- describe
- shortlog
- show
- submodule
- push
- pull
- fetch
- worktree
- tag
- stash
- log
- mergetool
- merge
- checkout
- branch
- mv
- rm
- reset
- commit
- diff
- status
- add
- clone
- init
- help
- config
- git
スポンサーリンク