2014-06-06 64 views
0

我不小心把幾個文件夾推到了bitbucket裏面,因爲我用git克隆了它們,所以它們中有.git文件夾。Bitbucket submodules不會刪除

enter image description here

我無法點擊這些文件夾或進入他們到位桶

我該怎麼辦擺脫那些我已經使用:

rm -rf .git 

那兩個。 git文件夾 then:

git reset --hard ^HEAD 
git push 
git commit -a -m "Message" 
git push 

我也嘗試設置提交回一個,但也沒有工作。 這裏沒有子模塊文件我也從那裏移動目錄的文件夾,並進行了另一次推動,但他們仍然apear。

+0

除了Git中的修復,你可以去掉bitbucket上公開回購的更改 – jozefg

+0

我已經回滾了我對bitbucket的提交,但更改仍然存在? – MikaAK

回答

3

這些不是「您在.bucket網站上看​​到的.git文件夾」。

這些是submodules

和卸下.git,推動不會改變,因爲:

要刪除子模塊,請參閱「How do I remove a Git submodule?」(git 1.8.5+):

git submodule deinit asubmodule  
git rm asubmodule 
# Note: asubmodule (no trailing slash) 
# or, if you want to leave it in your working tree 
git rm --cached asubmodule 

然後提交併推送。

+0

試過這個.gitmodule從來沒有在那裏。運行git ls-files --stage |沒有結果的grep 160000嘗試從緩存中刪除並重新推送使用-f,它不起作用 – MikaAK

+0

@如果你現在克隆你的回購,你會看到那些條目嗎?我無法訪問您的回購顯然是自己看看。 – VonC

+0

不,他們不在那裏,如果我克隆,他們似乎已經刪除過夜 – MikaAK