How to use version control (git) correctly with pyro?
Created 5 years ago by dilusha100

I uploaded my pyrocms based web site to github. In my web I tried my best to be loosely coupled with anomaly modules from classes which i make. But my user have some relationship with modules which I create, for example an User has a Company.

So, when I clone my project from github to another location and run composer install it will erase all above relationship data and install a new user module. After that there are no more relationship and even this will erase the extra fields which I added to user module.

How to escape from this?

ryanthompson  —  5 years ago

The root project comes ready to use with git along with ignores and all that setup for you. The core/* for example should not be committed. Sounds like you may have modified some things? The ONLY thing you might want to add to your git tracking it the composer.lock file. Other than that it's ready to rock n roll. So to answer your question I guess you'd need to undo any changes you've potentially done to ignore files / tracking configuration.

edster  —  5 years ago

The only way you would run into these issues is if you are overriding core module files, or you are not transferring over a database, as those changes made via gui would be stored there.

dilusha100  —  5 years ago

thanks for replyig... But in case of I add new field to user, then it will update the UserModel. So, now I clone this project and run composer intall, it will delete this new record. I'm I correct? ( sorry for my bad english)