douzhi1937 2015-04-08 12:53
浏览 38
已采纳

如何用git开发magento? [关闭]

I want to use git to develop the magento website. The local development environment is xampp and the ultimate website should run in the AWS, which is a lamp environment.

I use a git tool called SourceTree to control the local source in the xampp. After the xampp site is working well, I push the local source to the AWS server. yes the source is the same as the local. but, the mysql data can't be synchronsized. (if I config something in the admin panel of magento, the mysql data will be changed. In this way, the server side mysql data will not change.)

I think there should be a DB migration tool to synchronize the Database. this is just a thinking of new, any professional magento developer point me the right way to organize the team development. Thanks so much!

  • 写回答

1条回答 默认 最新

  • duanchandun1860 2015-04-08 13:27
    关注

    1) Code organisation - you should use branches when doing new development, then you can merge the branch to the master when you want the new changes to go the production environment. You can remove branches after merging, but this is your choice.

    2) Database - take a backup of your database, upload it as part of your code if not too large, use FTP if too large, then, create an .sh script which would trigger a database import on AWS. You can execute the .sh script from AWS. You would need to know how to write a bash script. You could do direct commands from the server itself. If your production environment cannot experience downtime, I suggest you do backed changes manually, and everything else from SQL upgrade script.

    3) Always use useful comments when updating branches / master. A identification system would make your life much easier. Ex, New Development #1, #2 and so on. You could even use a tool like 'targertprocess' which would allow you to keep a full history of what you are doing.

    4) Git usually comes with a WIKI, use and update this WIKI to your advantage. Place deployment instructions here and so on.

    5) It might not be possible, but try to keep similar environments in your process. So you should use a LAMPP based system if your production environment is based on LAMPP. Use a VM instead of XAMPP, checkout the tool 'vagrant' for this, and this website to create VMs easily. (https://puphpet.com/)

    Hope this helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!