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.

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

报告相同问题?

悬赏问题

  • ¥15 nrf52810-c三个a 程序
  • ¥15 lego-loam跑出来的roll误差很大
  • ¥50 求一个半透明没有锯齿的圆角窗体的实现例子
  • ¥15 STM32cubeMX里的FreeRTOS无法释放内存
  • ¥15 CATIA有些零件打开直接单机确定终止
  • ¥15 请问有会的吗,用MATLAB做
  • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
  • ¥15 ARIMA模型时间序列预测用pathon解决
  • ¥15 孟德尔随机化怎样画共定位分析图
  • ¥18 模拟电路问题解答有偿速度