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!

图片转代码服务由CSDN问答提供 功能建议

我想使用git开发 magento 网站。 本地开发环境是 xampp ,最终的网站应该在 AWS 中运行,这是一个 lamp 环境。

我使用名为SourceTree的git工具来控制 xampp 中的本地源。 在 xampp 站点运行良好之后,我将本地源推送到 AWS服务器。 是的,源与本地相同。 但是, mysql 数据无法同步。 (如果我在 magento 的管理面板中配置了一些内容, mysql 数据将被更改。这样,服务器端 mysql 数据将会 不要改变。)

我认为应该有一个数据库迁移工具来同步数据库。 这只是对新事物的思考,任何专业的 magento 开发人员都指出了组织团队开发的正确方法。 非常感谢!

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

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. (

    Hope this helps.

    打赏 评论

相关推荐 更多相似问题