私はGitリポジトリをKilnからGithubに移行しようとしています。私はちょうど罰金リモート新しいを追加することができますが、私は新しいリモートにマスターをプッシュしようとすると、私は次のエラーを取得する:git repoから '.git'ディレクトリを削除しますか?
Counting objects: 8691, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3000/3000), done.
remote: error: object a9ee490ac00987835de30bdbc851da5e8d45d28b:contains '.git'
remote: fatal: Error in object
error: pack-objects died of signal 13
error: failed to push some refs to '[email protected]:Account/repo.git'
はa9ee490ac00987835de30bdbc851da5e8d45d28b
をコミットそれに以下のファイルがあります。
.git/
CHANGELOG.md
JSONKit.h
JSONKit.m
README.md
明らかに、過去に誰かがhg
を使って、サブディレクトリ内の完全なgit repoをチェックしました。
私はそのディレクトリを完全に削除したいのですが、gitの履歴からそのファイルを削除するのに問題があります。
答えはpushing a git repo fails with error: contains '.git'です。私はレシピをgit repoとして扱いました。水銀のレポではありません。
私はgit filter-branch --index-filter 'git rm -r --cached --ignore-unmatch .git'
を試してみましたが、私はエラーを取得:
Rewrite 7dbd0970d6c79215d11994b4a9b8091b2e954cfb (326/442)error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/HEAD'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/config'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/description'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/applypatch-msg.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/commit-msg.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/post-update.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/pre-applypatch.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/pre-commit.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/pre-rebase.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/prepare-commit-msg.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/hooks/update.sample'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/index'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/info/exclude'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/logs/HEAD'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/logs/refs/heads/master'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/objects/pack/pack-43fac03d375df5c1e380c5e522ba6bcb9b4e1ec1.idx'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/objects/pack/pack-43fac03d375df5c1e380c5e522ba6bcb9b4e1ec1.pack'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/packed-refs'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/refs/heads/master'
error: Invalid path 'Account/Libraries/ShareKit/Submodules/JSONKit/.git/refs/remotes/origin/HEAD'
と歴史が変わっていないようです。私は私のgit知識の限界にいる。誰も助けることができますか?
repoオープンソースですか?あなたはそれのコピーを共有することができますか? –
ああ、問題のリポジトリのコピーを共有する必要はありません。同じ種類の不良ツリーを持つGitリポジトリを構築することができました。これはテスト目的で使用できます。 –
[git repoがエラーで失敗する: '.git'が含まれています](http://stackoverflow.com/questions/14728751/pushing-a-git-repo-fails-with-error-contains-git) –