2011-02-13 16 views
0

私たちの会社はPerfoceを使ってプロジェクトを管理しています。私はローカル側でPerforceリポジトリを同期するためにgit-p4を使用しています。 しかし、P4リポジトリでは、多くのモジュールと組み合わされ、一部のモジュール用に.gitフォルダを含むことがあります。誰かがそれは常にいくつかのファイルが削除されたと言う、ローカルのGitを使用して、私はgitの-P4クローンによってP4のクローンを作成する場合:(git-p4インポートツリーにはサブディレクトリ.gitが含まれています

をPERFORCEのために/ .gitを置く。

# On branch master 
# Changes to be committed: 
# (use "git reset HEAD <file>..." to unstage) 
# 
#  deleted: module-by-git/.git/FETCH_HEAD 
#  deleted: module-by-git/.git/HEAD 
#  deleted: module-by-git/.git/ORIG_HEAD 
#  deleted: module-by-git/.git/config 
#  deleted: module-by-git/.git/description 
#  deleted: module-by-git/.git/hooks/commit-msg 
#  deleted: module-by-git/.git/hooks/pre-auto-gc 
#  deleted: module-by-git/.git/index 
#  deleted: module-by-git/.git/info/exclude 
#  deleted: module-by-git/.git/logs/HEAD 
#  deleted: module-by-git/.git/logs/refs/remotes/m/master 

私が使用してみてくださいこれらのファイルを削除するには "git filter-branch"を使用しますが、ダーティな作業ディレクトリでの使用を禁じています

この問題を解決するにはどうすればよいですか? 以前の回避策では、ツールを開き、プロジェクト全体を再度クローンします。

答えて

0

クローニング時に.gitリポジトリを除外する、つまり

git p4 clone ... -//module-by-git/.git 
関連する問題