Brotzka
Brotzka

Reputation: 2785

git folder is listed locally but not on remote branch

I've a folder on my local branch(-es) under packages/producer-iframe (e.g. in branch "dev-master"). Unfortunately this folder doesn't exist on my remote branch (e.g. "origin/dev-master").

I've tried to rename/relocate the folder, committed and pushed again. Nothing worked.

I've also tried to create a new branch, added the specific files but this also didn't work.

How can I add this folder to my remote branches?

Edit: the folder is not empty. it contains other folders and files.

Edit: We use tags/versions to handle our production system. The strange thing is, that this folder was released on version before (and was working). Now, one release later it "disappeared" from the dev-master branch.

Upvotes: 0

Views: 2740

Answers (2)

tmaj
tmaj

Reputation: 34947

It's not uncommon to have packages folder in .gitignore

If this is your case you can modify you're .gitignore in two ways:

  • Remove packages line
  • Add !packages/producer-iframe (git >= 2.9)

Upvotes: 0

Code-Apprentice
Code-Apprentice

Reputation: 83517

Git only tracks files. It does not track folders. So if you have an empty folder in your local working directory, you cannot add it to git. You need to add some files to the folder first and commit those.

Upvotes: 1

Related Questions