Rakib
Rakib

Reputation: 13085

why do i see .gitignored files/folders present inside a git repo?

i am talking about http://www.github.com/cakephp/cakephp for example. In that repo, the .gitignore file says the folder /plugins is ignored. However, the source does include the /plugins folder in the repo. How is that possible?

Upvotes: 1

Views: 96

Answers (2)

dusual
dusual

Reputation: 2207

Adding .gitignore will exclude the files in /plugins when you are committing/pushing to the repo after you add the regex. It does not mean all the files would always be ignored.

Upvotes: 1

Ben Jackson
Ben Jackson

Reputation: 93690

You can explicitly git add files you ignore or ignore files you previously committed to the repo. All the .gitignore does is prevent future git status and git add from including those files.

In your example it may be that there are a lot of randomly named build products in /plugins that are annoying and the author just wanted to quickly get them out of git status. Or it may be common to clone the project and drop in your own local plugins.

Upvotes: 3

Related Questions