1

I'm using gitlab to host my project, I am developing a web application using symfony, I added a bundle using composer, and of course composer downloaded the bundle and placed it under /vendor (for my case and for this bundle its vendor\nomaya\social-bundle\Nomaya\).

Now usually when I commit and push the project, the whole project is pushed (including /vendor, I removed it from gitignore).
But for this specific bundle, I couldn't push the SocialBundle folder (which is inside the Nomya folder).

So when I checked GitLab, it turned out that it somehow created an archive file named SocialBundle, and I cant removed manually, and it does not get pulled when I pull.

So how can I remove this archive and pull my directory?

enter image description here

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Ouerghi Yassine
  • 1,835
  • 7
  • 43
  • 72

1 Answers1

0

it somehow created an archive file named SocialBundle,

It is not an archive but a gitlink (a special entry in the index, which represents the SHA1 of a nested git repo: a repo within your repo)

and I cant removed manually:

git pull
# No trailing slash: you are not removing a folder, but an entry in your index.
git rm SocialBundle
git commit -m "remove gitlink"
git push

(Then try again including your bundle)

and it does not get pulled when I pull

Since it is not a submodule (where the url of that nested repo would be registered in a .gitmodule), all git has is the SHA1 of a repo it does not know the url of.
That is why the entry remains empty.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you, i could remove that gitlink, but each time i push again, i get the same gitlink, not an actual directory – Ouerghi Yassine May 15 '16 at 08:23
  • @OuerghiYassine Each time you push? Or pull? – VonC May 15 '16 at 08:23
  • @OuerghiYassine if you still see it on the GitLab side, then you did not commit the `git rm`, as it would have recorded the deletion of `SocialBundles`. Or you did not do the `git rm` in the right folder . – VonC May 15 '16 at 08:25
  • after i push (after i deleted then commited), i dont see it on Gitlab, i then re-create the SocialBundles folder, and re push, i get the same gitlink – Ouerghi Yassine May 15 '16 at 08:35
  • @OuerghiYassine check if there is a `.git` within `SocialBundles` on your local repo. If so, delete it (regular `rm` command, no `git` commad involved here), before add, commit and push. – VonC May 15 '16 at 08:38
  • finally, got it, it was the `README.md` which resulted in that in that gitlink, i removed it and it worked, thanks. – Ouerghi Yassine May 15 '16 at 08:38