Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So, I have the next problem. For example my gitignore file contains this:

/app/config
/app/tmp
/plugins
/vendors
If this is my first push to bared remote git server after that described files won't be sended. But if I at least one time sended this files without gitignore, then made gitignore contains:
/app/config
/app/tmp
/plugins
/vendors
Git will push this files too. So, how can I gitignore already pushed files for the next commits?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You cannot remove them from history without breaking everything for people which have already cloned your repository, and that is hard and time-consuming anyway. Just remove them with git rm <...> and push your changeset.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.