亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
characters

Name

git-remote  - 管理追蹤存儲(chǔ)庫(kù)的集合

概要

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>)…]

描述

管理您追蹤分支的一組存儲(chǔ)庫(kù)(“遠(yuǎn)程”)。

選項(xiàng)

-v   --verbose

稍微詳細(xì)一點(diǎn),并在名稱(chēng)后顯示遠(yuǎn)程 URL 。注意:這必須放在remote和之間subcommand

命令

沒(méi)有參數(shù),顯示現(xiàn)有遙控器的列表。幾個(gè)子命令可用于在遙控器上執(zhí)行操作。

add

在 <url> 處添加一個(gè)名為 <name> 的存儲(chǔ)庫(kù)。該命令git fetch <name>然后可用于創(chuàng)建和更新遠(yuǎn)程跟蹤分支<name> / <branch>。

使用-f選項(xiàng),git fetch <name>在遠(yuǎn)程信息設(shè)置完成后立即運(yùn)行。

使用--tags選項(xiàng),git fetch <name>從遠(yuǎn)程存儲(chǔ)庫(kù)導(dǎo)入每個(gè)標(biāo)記。

使用--no-tags選項(xiàng),git fetch <name>不會(huì)從遠(yuǎn)程存儲(chǔ)庫(kù)導(dǎo)入標(biāo)簽。

默認(rèn)情況下,只有取回分支上的標(biāo)簽被導(dǎo)入(參見(jiàn) git-fetch [1])。

使用-t <branch>選項(xiàng),而不是遠(yuǎn)程的默認(rèn) glob refspec 來(lái)跟蹤refs/remotes/<name>/命名空間下的所有分支,將<branch>創(chuàng)建僅用于跟蹤的 refspec 。您可以給-t <branch>多個(gè)分支追蹤多個(gè)分支,而無(wú)需抓取所有分支。

使用-m <master>選項(xiàng),符號(hào)引用refs/remotes/<name>/HEAD被設(shè)置為指向遠(yuǎn)程的<master>分支。另請(qǐng)參閱 set-head 命令。

當(dāng)創(chuàng)建獲取鏡像時(shí)--mirror=fetch,參考將不會(huì)存儲(chǔ)在refs/remotes/命名空間中,而是refs/將遠(yuǎn)程中的所有內(nèi)容直接鏡像到refs/本地存儲(chǔ)庫(kù)中。這個(gè)選項(xiàng)在裸存儲(chǔ)庫(kù)中才有意義,因?yàn)樘崛?huì)覆蓋任何本地提交。

當(dāng)創(chuàng)建一個(gè)推式鏡像時(shí)--mirror=push,它git push總是表現(xiàn)得好像--mirror被傳遞一樣。

rename

將名為 <old> 的遠(yuǎn)程重命名為 <new> 。遠(yuǎn)程的所有遠(yuǎn)程跟蹤分支和配置設(shè)置都會(huì)更新。

如果 <old> 和 <new> 相同,并且 <old> 是$GIT_DIR/remotes或者下的文件$GIT_DIR/branches,則將遠(yuǎn)程轉(zhuǎn)換為配置文件格式。

remove   rm

刪除名為 <name> 的遠(yuǎn)程。遠(yuǎn)程的所有遠(yuǎn)程跟蹤分支和配置設(shè)置均被刪除。

set-head

設(shè)置或刪除refs/remotes/<name>/HEAD指定遠(yuǎn)程的默認(rèn)分支(即 symbolic-ref 的目標(biāo))。有一個(gè)遠(yuǎn)程的默認(rèn)分支不是必需的,但允許指定遠(yuǎn)程的名稱(chēng)來(lái)代替特定的分支。例如,如果默認(rèn)分支for origin設(shè)置為master,則origin可以在通常指定的任何位置指定origin/master。

使用-d--delete,符號(hào) ref refs/remotes/<name>/HEAD被刪除。

使用-a--auto,遠(yuǎn)程被查詢來(lái)確定它HEAD,然后 symbolic-ref  refs/remotes/<name>/HEAD被設(shè)置為同一分支。例如,如果遠(yuǎn)程HEAD正指向nextgit remote set-head origin -a”將設(shè)置符號(hào) -REF refs/remotes/origin/HEADrefs/remotes/origin/next。這只有在refs/remotes/origin/next已經(jīng)存在的情況下才有效; 如果不是,它必須先取得。

用于顯式<branch>設(shè)置符號(hào)引用refs/remotes/<name>/HEAD。例如,“GIT 中遠(yuǎn)程設(shè)置頭原點(diǎn)主”將設(shè)置符號(hào) -REF refs/remotes/origin/HEADrefs/remotes/origin/master。這只有在refs/remotes/origin/master已經(jīng)存在的情況下才有效; 如果不是,它必須先取得。

set-branches

更改已命名遠(yuǎn)程所跟蹤分支的列表。這可以用于在遠(yuǎn)程初始設(shè)置后跟蹤可用遠(yuǎn)程分支的一個(gè)子集。

指定的分支將被解釋為與命令行中的-t選項(xiàng)一起指定git remote add。

隨著--add的,而不是替換當(dāng)前跟蹤的分支列表,添加到列表中。

get-url

檢索遠(yuǎn)程的 URL 。這里的配置insteadOfpushInsteadOf擴(kuò)展。默認(rèn)情況下,僅列出第一個(gè) URL 。

使用--push,查詢推送 URL 而不是獲取 URL 。

--all,遠(yuǎn)程的所有 URL 將被列出。

set-url

更改遠(yuǎn)程的 URL 。為匹配 regex <oldurl> 的遠(yuǎn)程 <name> 設(shè)置第一個(gè) URL(如果沒(méi)有給出 <oldurl> ,則為第一個(gè) URL )為 <newurl> 。如果 <oldurl> 與任何 URL 都不匹配,則會(huì)發(fā)生錯(cuò)誤并且沒(méi)有任何更改。

使用時(shí)--push,推送網(wǎng)址將被操縱,而不是抓取網(wǎng)址。

隨著--add,而不是改變現(xiàn)有的 URL ,新的 URL 添加。

--delete,而不是改變現(xiàn)有的 URL ,所有匹配正則表達(dá)式 <URL> URL 被用于遠(yuǎn)程 <name> 刪除。試圖刪除所有非推送網(wǎng)址是一個(gè)錯(cuò)誤。

請(qǐng)注意,即使可以設(shè)置不同的推送網(wǎng)址和提取網(wǎng)址,仍必須引用相同的地方。您推送到推送網(wǎng)址的內(nèi)容應(yīng)該是您立即從提取網(wǎng)址獲取的內(nèi)容。如果您試圖從一個(gè)地方(例如上游)獲取數(shù)據(jù)并推送到另一個(gè)地方(例如您的發(fā)布存儲(chǔ)庫(kù)),請(qǐng)使用兩個(gè)單獨(dú)的遙控器。

show

給出關(guān)于遠(yuǎn)程 <name> 的一些信息。

通過(guò)-n選項(xiàng),遠(yuǎn)程頭不首先被查詢git ls-remote <name>; 取而代之的是使用緩存的信息。

prune

刪除 <name> 下的所有陳舊的遠(yuǎn)程追蹤分支。這些陳舊的分支已從 <name> 引用的遠(yuǎn)程存儲(chǔ)庫(kù)中刪除,但仍在本地“remotes / <name>”中可用。

使用--dry-run選項(xiàng),報(bào)告將修改哪些分支,但不實(shí)際修改它們。

update

按遙控器 <group> 的定義,獲取存儲(chǔ)庫(kù)中一組指定遙控器的更新。如果未在命令行中指定命名組,則將使用配置參數(shù) remotes.default ; 如果沒(méi)有定義 remotes.default ,那么沒(méi)有配置參數(shù) remote. <name> .skipDefaultUpdate 設(shè)置為 true 的所有遙控器都將被更新。(請(qǐng)參閱 git-config [1])。

使用--prune選項(xiàng),修剪所有更新的遙控器。

討論

遠(yuǎn)程配置使用remote.origin.urlremote.origin.fetch配置變量來(lái)實(shí)現(xiàn)。(請(qǐng)參閱 git-config [1])。

例子

  • 添加一個(gè)新的遠(yuǎn)程,獲取并簽出一個(gè)分支 $ git remote origin $ git branch -r origin / HEAD  - > origin / master origin / master $ git remote add staging git://git.kernel.org/。 ../gregkh/staging.git $ git 遠(yuǎn)程原點(diǎn)暫存 $ git fetch staging ...從git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging *新的分支主控 - > staging / staging-next $ git branch -r origin / HEAD  - > origin / master origin / master staging / master staging / master staging / master staging / master staging / master staging / staging-linus staging / staging-next $ git checkout -b臨時(shí)分段/主...

  • 模仿git clone但只追蹤選定的分支

$ 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

git-fetch [1] git-branch [1] git-config [1]

Previous article: Next article: