亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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

命名

gitcvs-migration - Git for CVS users

概要

git cvsimport *

描述

Git 與 CVS 的不同之處在于,每個(gè)工作樹(shù)都包含一個(gè)具有項(xiàng)目歷史記錄完整副本的存儲(chǔ)庫(kù),并且任何存儲(chǔ)庫(kù)本身都比其他任何存儲(chǔ)庫(kù)都重要。但是,您可以通過(guò)指定人員可以同步的單個(gè)共享存儲(chǔ)庫(kù)來(lái)模擬 CVS 模型; 本文檔解釋了如何做到這一點(diǎn)。

對(duì) Git 有一些基本的了解是必需的。通過(guò) gittutorial [7] 和 gitglossary [7] 就足夠了。

針對(duì)共享存儲(chǔ)庫(kù)進(jìn)行開(kāi)發(fā)

假設(shè)在主機(jī) foo.com 上的 /pub/repo.git 中設(shè)置了共享存儲(chǔ)庫(kù)。然后作為一個(gè)單獨(dú)的提交者,你可以通過(guò) ssh 克隆共享庫(kù):

$ git clone foo.com:/pub/repo.git/ my-project
$ cd my-project

并刪去。相當(dāng)于cvs update

$ git pull origin

它合并在副本操作后其他人可能完成的任何工作中。如果工作樹(shù)中有未提交的更改,請(qǐng)?jiān)谶\(yùn)行 git pull 之前先提交它們。

Note

The pull command knows where to get updates from because of certain configuration variables that were set by the first git clone command; see git config -l and the git-config1 man page for details.

您可以通過(guò)首先提交更改并使用以下git push命令來(lái)更新共享存儲(chǔ)庫(kù):

$ git push origin master

將這些提交 “push” 到共享存儲(chǔ)庫(kù)。如果其他人最近更新了存儲(chǔ)庫(kù)git push,就像cvs commit會(huì)抱怨的那樣,在這種情況下,您必須在嘗試再次推送前進(jìn)行任何更改。

git push上面的命令中,我們指定了要更新(master)的遠(yuǎn)程分支的名稱。如果我們不這樣做,則git push嘗試更新遠(yuǎn)程存儲(chǔ)庫(kù)中與本地存儲(chǔ)庫(kù)中的分支具有相同名稱的任何分支。所以最后push可以通過(guò)以下任一方式完成:

$ git push origin
$ git push foo.com:/pub/project.git/

只要共享存儲(chǔ)庫(kù)沒(méi)有任何其他分支master。

設(shè)置共享存儲(chǔ)庫(kù)

我們假設(shè)您已經(jīng)為您的項(xiàng)目創(chuàng)建了一個(gè) Git 存儲(chǔ)庫(kù),可能是從頭開(kāi)始或從 tarball 創(chuàng)建的(請(qǐng)參閱 gittutorial [7]),或者從現(xiàn)有的 CVS 存儲(chǔ)庫(kù)導(dǎo)入(請(qǐng)參閱下一節(jié))。

假設(shè)您的現(xiàn)有回購(gòu)在 / home / alice / myproject 。創(chuàng)建一個(gè)新的 “bare” 存儲(chǔ)庫(kù)(一個(gè)沒(méi)有工作樹(shù)的存儲(chǔ)庫(kù))并將你的項(xiàng)目存入它:

$ mkdir /pub/my-repo.git
$ cd /pub/my-repo.git
$ git --bare init --shared
$ git --bare fetch /home/alice/myproject master:master

接下來(lái),讓每個(gè)團(tuán)隊(duì)成員都可以讀取/寫入這個(gè)存儲(chǔ)庫(kù)。一個(gè)簡(jiǎn)單的方法是讓所有團(tuán)隊(duì)成員 ssh 訪問(wèn)存儲(chǔ)庫(kù)所在的機(jī)器。如果你不想在機(jī)器上給它們一個(gè)完整的外殼,那么就有一個(gè)限制外殼,它只允許用戶做 Git 推動(dòng)和拉動(dòng); 請(qǐng)參閱 git-shell [1] 。

將所有提交者放在同一組中,并使該存儲(chǔ)庫(kù)可由該組寫入:

$ chgrp -R $group /pub/my-repo.git

確保提交者擁有最多027的 umask ,以便他們創(chuàng)建的目錄可由其他組成員寫入和搜索。

導(dǎo)入一個(gè) cvs 檔案

Note

These instructions use the git-cvsimport script which ships with git, but other importers may provide better results. See the note in git-cvsimport1 for other options.

首先,從https://github.com/andreyvit/cvsps安裝 cvsps2.1 或更高版本,并確保它在你的路徑中。然后 cd 到您感興趣的項(xiàng)目的簽出 CVS 工作目錄并運(yùn)行 git-cvsimport [1] :

$ git cvsimport -C <destination> <module>

這會(huì)將名為 CVS 模塊的 Git 存檔放在目錄 <destination> 中,如果需要將會(huì)創(chuàng)建它。

導(dǎo)入從 CVS 檢出每個(gè)文件的每個(gè)修訂版本。據(jù)報(bào)道,cvsimport 平均每秒可以修改大約20個(gè)版本,所以對(duì)于一個(gè)中等規(guī)模的項(xiàng)目來(lái)說(shuō),這應(yīng)該不會(huì)超過(guò)幾分鐘。較大的項(xiàng)目或遠(yuǎn)程存儲(chǔ)庫(kù)可能需要更長(zhǎng)的時(shí)間。

主干存儲(chǔ)在命名為origin的 Git 分支中,其他 CVS 分支存儲(chǔ)在具有相同名稱的 Git 分支中。主干線的最新版本也會(huì)在master分支上檢出,因此您可以立即開(kāi)始添加自己的更改。

導(dǎo)入是增量式的,所以如果你在下個(gè)月再次調(diào)用它,它將獲取在此期間所做的任何 CVS 更新。為此,您不得修改導(dǎo)入的分支; 相反,請(qǐng)為自己的更改創(chuàng)建新分支,并根據(jù)需要合并輸入分支。

如果您需要共享存儲(chǔ)庫(kù),則需要對(duì)導(dǎo)入的目錄進(jìn)行裸機(jī)復(fù)制,如上所述。然后將導(dǎo)入的目錄作為另一個(gè)開(kāi)發(fā)副本用于合并增量導(dǎo)入。

高級(jí)共享存儲(chǔ)庫(kù)管理

Git 允許你指定在某些點(diǎn)運(yùn)行的叫做 “hooks” 的腳本。例如,您可以使用它們將所有提交到共享存儲(chǔ)庫(kù)的郵件發(fā)送到郵件列表。見(jiàn) githooks [5] 。

您可以使用更新掛鉤來(lái)實(shí)施更細(xì)粒度的權(quán)限。請(qǐng)參閱使用更新掛鉤控制對(duì)分支機(jī)構(gòu)的訪問(wèn)。

提供對(duì) git 存儲(chǔ)庫(kù)的 cvs 訪問(wèn)

還可以提供對(duì) Git 存儲(chǔ)庫(kù)的真正 CVS 訪問(wèn),以便開(kāi)發(fā)人員仍然可以使用 CVS ; 有關(guān)詳細(xì)信息,請(qǐng)參閱 git-cvsserver [1] 。

替代發(fā)展模式

CVS 用戶習(xí)慣于讓一組開(kāi)發(fā)人員訪問(wèn)公共存儲(chǔ)庫(kù)。正如我們所看到的,Git 也可以這樣做。但是,Git 的分布式特性允許其他開(kāi)發(fā)模型,您可能需要首先考慮其中一個(gè)模型是否適合您的項(xiàng)目。

例如,您可以選擇一個(gè)人來(lái)維護(hù)項(xiàng)目的主要公共存儲(chǔ)庫(kù)。其他開(kāi)發(fā)人員然后復(fù)制這個(gè)存儲(chǔ)庫(kù),并在他們自己的副本中工作 當(dāng)他們有一系列他們感到滿意的變化時(shí),他們會(huì)要求維護(hù)人員從包含變更的分支中撤出。維護(hù)人員檢查他們的變化并將他們拖入主存儲(chǔ)庫(kù)中,其他開(kāi)發(fā)人員根據(jù)需要從中取得協(xié)調(diào)。Linux 內(nèi)核和其他項(xiàng)目使用此模型的變體。

通過(guò)一個(gè)小團(tuán)隊(duì),開(kāi)發(fā)人員可以在不需要集中維護(hù)人員的情況下從對(duì)方的存儲(chǔ)庫(kù)中獲取更改。

Previous article: Next article: