Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to Magento community version 1.8.0.0 #841

Closed
wants to merge 3 commits into from

Conversation

killpond
Copy link

Included protected and cache file ignoring.

All core files are listed since ignoring directories alone could have adverse effects when dealing with 3rd party modules.

Included protected and cache file ignoring.

All core files are listed since ignoring directories alone could have adverse effects when dealing with 3rd party modules.
@killpond
Copy link
Author

If this version of the file is too bloated I could amend it to ignore certain core directories that 3rd party module developers should not place files in if following best practice, for example "/app/code/core/Mage/*".

@arcresu
Copy link
Contributor

arcresu commented Nov 12, 2013

Sorry but.. I really don't think a 690 KB gitignore file with 12109 lines is justifiable. What would be wrong with ignoring the directories instead of listing each individual file? And why are so many rules necessary anyway? It would be much appreciated if you could link to a reference describing the layout of a magento project so that we can understand what these rules are trying to do.

@killpond
Copy link
Author

I will revise and resubmit a much cleaner version.

@killpond
Copy link
Author

Hi arcresu, the issue is that in my experience many 3rd party modules will place files within many of the paths that may be ignored. I have revised the file assuming these modules will follow best practice, for example not installing files in "app/core/core/Mage". If I were to make the rules any more greedy then they are in my last commit I feel users would experience issues when trying to install modules via source control.

/app/design/frontend/default/iphone/template/tag/
@arcresu
Copy link
Contributor

arcresu commented Nov 12, 2013

I'm afraid I still don't understand what's intended here. Is the idea that you intend to ignore all of the files which exist when magento is freshly installed? Won't that cause an issue in that the repository does not contain all of the necessary files for the app to run?

Consider the wordpress template for example. It's helpful to developers because it points out the few files and directories that should be ignored because they are for generated or temporary files, but the wordpress framework itself is checked in since it is necessary for the app to function.

Typically a gitignore template will have rules for a small number of well-known files and directories which are relevant to a project, and github curates a set of best practices concerning how they should be treated by git. What you are proposing seems to be a list of all the files installed by a particular version of magento. This means that the template will only ever be relevant for that one very particular version of magento and will need to be frequently updated to match future changes in magento. I don't think that fits with the goals of this gitignore repository; it seems more sensible to have a simple script generate a gitignore file from the relevant magento source, and that is outside the scope of this repo.

@killpond
Copy link
Author

Thanks for getting back to me. Our common practice is not to contain the Magento source code within our repository since the single most important rule of Magento is "Don't edit the core code". I (wrongly?) assume that every Magento developer does the same as us since the repository’s are much lighter when working in this way.

I completely understand your points and I agree that the amends I have made are not applicable for this repository, even thou I feel there is no better way of working with Magento :)

@arcresu
Copy link
Contributor

arcresu commented Nov 12, 2013

Okay well thanks anyway. I'm not sure how best to use some of these PHP frameworks with git--it seems like a job for a better dependency management tool so that the framework and app source code can be cleanly separated. In any case, I think we'll close this as out of scope for this template.

@arcresu arcresu closed this Nov 12, 2013
@killpond
Copy link
Author

Completely agree. The Magento community has created tools to manage deployment of modules but from a module development perspective I still highly depend on using .gitignore.

I think I will look at creating a public repository for these types of rules as I am sure it would be useful to others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants