X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-remote.txt;h=5a8c5061f3701c57bab75b2b4c70ad620f7e536f;hb=c4a01a3cbbd8b642a3ffc6bc550b68ac63d500ed;hp=528f34a13106836c1eace8c5d8972543b6fcc121;hpb=69d61daec7a7915f6a664f32002fd9403e7f2a34;p=git.git diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt index 528f34a13..5a8c5061f 100644 --- a/Documentation/git-remote.txt +++ b/Documentation/git-remote.txt @@ -60,11 +60,11 @@ the remote repository. + With `-t ` option, instead of the default glob refspec for the remote to track all branches under -`$GIT_DIR/remotes//`, a refspec to track only `` +the `refs/remotes//` namespace, a refspec to track only `` is created. You can give more than one `-t ` to track multiple branches without grabbing all branches. + -With `-m ` option, `$GIT_DIR/remotes//HEAD` is set +With `-m ` option, a symbolic-ref `refs/remotes//HEAD` is set up to point at remote's `` branch. See also the set-head command. + When a fetch mirror is created with `\--mirror=fetch`, the refs will not @@ -92,24 +92,25 @@ configuration settings for the remote are removed. 'set-head':: -Sets or deletes the default branch (`$GIT_DIR/remotes//HEAD`) for +Sets or deletes the default branch (i.e. the target of the +symbolic-ref `refs/remotes//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 for `origin` is set to `master`, then `origin` may be specified wherever you would normally specify `origin/master`. + -With `-d`, `$GIT_DIR/remotes//HEAD` is deleted. +With `-d`, the symbolic ref `refs/remotes//HEAD` is deleted. + -With `-a`, the remote is queried to determine its `HEAD`, then -`$GIT_DIR/remotes//HEAD` is set to the same branch. e.g., if the remote +With `-a`, the remote is queried to determine its `HEAD`, then the +symbolic-ref `refs/remotes//HEAD` is set to the same branch. e.g., if the remote `HEAD` is pointed at `next`, "`git remote set-head origin -a`" will set -`$GIT_DIR/refs/remotes/origin/HEAD` to `refs/remotes/origin/next`. This will +the symbolic-ref `refs/remotes/origin/HEAD` to `refs/remotes/origin/next`. This will only work if `refs/remotes/origin/next` already exists; if not it must be fetched first. + -Use `` to set `$GIT_DIR/remotes//HEAD` explicitly. e.g., "git -remote set-head origin master" will set `$GIT_DIR/refs/remotes/origin/HEAD` to +Use `` to set the symbolic-ref `refs/remotes//HEAD` explicitly. e.g., "git +remote set-head origin master" will set the symbolic-ref `refs/remotes/origin/HEAD` to `refs/remotes/origin/master`. This will only work if `refs/remotes/origin/master` already exists; if not it must be fetched first. +