bottleboot
bottleboot

Reputation: 1699

How to preserve the content of an ignored folder in Git

I have a folder name: 'create_assets', where I store my source files of images and other media, like psd's.

I don't want this to be included in my Git project so the folder is ignored. However during a push/pull sync last week I lost all the contents of that folder.

I was unable to recover the folder and files. Do I just keep this 'create_assets' folder out of my project folder or can I keep it secure without stopping to ignore it?

Upvotes: 0

Views: 87

Answers (2)

Adam Dymitruk
Adam Dymitruk

Reputation: 129594

You could also just initialize a git repo and place it there. That would also allow you to keep that directory and version it as well.

Upvotes: 1

dkruythoff
dkruythoff

Reputation: 361

You could add a .gitignore to the folder with a single '*' It will ignore the contents while keeping the folder in the repo.

Upvotes: 2

Related Questions