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 网络科学导论,网络控制
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)