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

目錄 搜尋
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
文字

命名

gitcvs-migration - Git for CVS users

概要

git cvsimport *

描述

Git 與 CVS 的不同之處在于,每個工作樹都包含一個具有項目歷史記錄完整副本的存儲庫,并且任何存儲庫本身都比其他任何存儲庫都重要。但是,您可以通過指定人員可以同步的單個共享存儲庫來模擬 CVS 模型; 本文檔解釋了如何做到這一點。

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

針對共享存儲庫進行開發(fā)

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

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

并刪去。相當于cvs update

$ git pull origin

它合并在副本操作后其他人可能完成的任何工作中。如果工作樹中有未提交的更改,請在運行 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.

您可以通過首先提交更改并使用以下git push命令來更新共享存儲庫:

$ git push origin master

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

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

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

只要共享存儲庫沒有任何其他分支master。

設(shè)置共享存儲庫

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

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

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

接下來,讓每個團隊成員都可以讀取/寫入這個存儲庫。一個簡單的方法是讓所有團隊成員 ssh 訪問存儲庫所在的機器。如果你不想在機器上給它們一個完整的外殼,那么就有一個限制外殼,它只允許用戶做 Git 推動和拉動; 請參閱 git-shell [1] 。

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

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

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

導入一個 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 到您感興趣的項目的簽出 CVS 工作目錄并運行 git-cvsimport [1] :

$ git cvsimport -C <destination> <module>

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

導入從 CVS 檢出每個文件的每個修訂版本。據(jù)報道,cvsimport 平均每秒可以修改大約20個版本,所以對于一個中等規(guī)模的項目來說,這應該不會超過幾分鐘。較大的項目或遠程存儲庫可能需要更長的時間。

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

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

如果您需要共享存儲庫,則需要對導入的目錄進行裸機復制,如上所述。然后將導入的目錄作為另一個開發(fā)副本用于合并增量導入。

高級共享存儲庫管理

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

您可以使用更新掛鉤來實施更細粒度的權(quán)限。請參閱使用更新掛鉤控制對分支機構(gòu)的訪問。

提供對 git 存儲庫的 cvs 訪問

還可以提供對 Git 存儲庫的真正 CVS 訪問,以便開發(fā)人員仍然可以使用 CVS ; 有關(guān)詳細信息,請參閱 git-cvsserver [1] 。

替代發(fā)展模式

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

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

通過一個小團隊,開發(fā)人員可以在不需要集中維護人員的情況下從對方的存儲庫中獲取更改。

上一篇: 下一篇: