X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-remote.txt;h=9e2b4eaa385db66ffe0c547f0452d29e9e3dc484;hb=86079872238041fa0e2aa6b8a94f7881f88e4316;hp=fad983e297514da7e847196b0375e3254fdf235d;hpb=3f3e2c26fa0325f4df952363f8f5046ca8158bb3;p=git.git diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt index fad983e29..9e2b4eaa3 100644 --- a/Documentation/git-remote.txt +++ b/Documentation/git-remote.txt @@ -13,9 +13,10 @@ SYNOPSIS 'git remote add' [-t ] [-m ] [-f] [--mirror] 'git remote rename' 'git remote rm' +'git remote set-head' [-a | -d | ] 'git remote show' [-n] 'git remote prune' [-n | --dry-run] -'git remote update' [group] +'git remote update' [-p | --prune] [group | remote]... DESCRIPTION ----------- @@ -53,8 +54,7 @@ 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 -up to point at remote's `` branch instead of whatever -branch the `HEAD` at the remote repository actually points at. +up to point at remote's `` branch. See also the set-head command. + In mirror mode, enabled with `\--mirror`, the refs will not be stored in the 'refs/remotes/' namespace, but in 'refs/heads/'. This option @@ -76,6 +76,30 @@ the configuration file format. Remove the remote named . All remote tracking branches and configuration settings for the remote are removed. +'set-head':: + +Sets or deletes the default branch (`$GIT_DIR/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 `-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 +`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 +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 +`refs/remotes/origin/master`. This will only work if +`refs/remotes/origin/master` already exists; if not it must be fetched first. ++ + 'show':: Gives some information about the remote . @@ -101,6 +125,8 @@ the configuration parameter remotes.default will get used; if remotes.default is not defined, all remotes which do not have the configuration parameter remote..skipDefaultUpdate set to true will be updated. (See linkgit:git-config[1]). ++ +With `--prune` option, prune all the remotes that are updated. DISCUSSION