当设计师无法访问所有源时,如何使用 GIT 构建 Web 应用程序?
我想在我们的工作中应用版本控制系统,但有一些困难,因为图形设计师只能访问视图模板(smarty)和CSS/JS,所以他无法设置Web应用程序的本地副本。
应用程序将这些元素拉到名为 /front/ 的单个目录
当前情况如下所示:
主要开发人员:在工作站上拥有自己的 apache 服务器,他 90% 的工作都使用 PHP。
第二个开发人员:有时通过本地网络工作(进行少量更改)(在主开发人员计算机上更改文件)
设计师:在家工作,拥有自己的独立域,具有站点克隆功能(我们称之为designerworkarea.com),仅可通过 FTP 访问模板和模板。 CSS。
开发/部署如下所示:
主要开发人员代码&在他的机器上测试所有 PHP,然后通过 FTP 将源代码放入主生产服务器(我们称之为 procutionarea.com)
设计器可以“使用 FTP”处理文件,因此每个更改都需要上传并可以在 Designerworkarea.com 上看到
部署前端,服务器上的管理员将视图模板从 /server/designerworkarea.com/front 复制到 /server/procutionarea.com/front (designerworkarea 和 Productionarea 在同一台 UNIX 机器上)
当然,有是一些同步(每天 1-2 次),因为主要开发人员需要向应用程序前端添加新元素/模板,这些元素/模板由设计师设计。
正如您所看到的,这有点混乱。当任何人都可以拥有自己的具有完整源代码的 LAMP 堆栈时,就不会有问题了,但设计人员无法访问除 front 之外的目录,因此他无法在本地计算机上设置此 Web 应用程序。
用 GIT 组织这个工作环境的最佳方式是什么?
注 1:设计者应该能够立即看到他的更改,但不能“通过提交”,因为在完成某些更改之前可能会进行大量尝试应立即进行的少量工作。我们不想每天有数百/数千次提交。
注 2:视图模板中随时可能出现错误,需要开发人员的干预。
I want to apply version control system in our job, but there are som difficulties, because graphic designer should have access only to view templates (smarty) and CSS/JS, so he can't set up local copy of web application.
Application has those elements pulled to single directory called /front/
Current situation looks like this:
Main developer: own apache server on workstation, he does 90% work with PHP.
Second developer: work sometimes (little changes) by local network (changing files on main developer machine)
Designer: Working in home, has own separate domain with site-clone (let's call it designerworkarea.com) with FTP access only to templates & css.
Development/deployment looks like this:
Main developer code & test all PHP on his machine, then put sources to main production server (let's call it procutionarea.com) by FTP
Designer works on files "with FTP", se every change need to be uploaded and is seen at designerworkarea.com
To deploy frontend, admin on server copy view templates from /server/designerworkarea.com/front to /server/procutionarea.com/front (designerworkarea and productionarea are at same unix machine)
Of course, there is some synchronisation (1-2 a day) because main developer need to add new elements/templates to frontend of application, wich were be styled by designer.
As you can see, this is some mess. There would be no problem when anyone could have own LAMP stack with full sources - but designer can't have access to directories other than front - so he can't set up this web application on his local machine.
What will be best way to organise this working enviroment with GIT ?
Note 1: Designer should have possibility to see his changes immediatly, but not 'by commit', because there can be lots of try's before completing some small amount of work wich should be commited at once. And we don't want to have hundreds/thousands commits a day.
Note 2: At any moment there can be error found in view templates wich requires intervention of developer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您需要您的设计师始终看到他/她的工作结果,最好利用 git 的“分布式”方面,并使用您的存储库的克隆:
这将允许设计者:
merge --squash< /code>
到)开发人员可以从中获取最新设计的特殊分支(无需获取所有中间提交)
。 (如 Git),您不必仅使用一个存储库进行同步。您可以有多个,每个都有不同的角色。
If you need for your designer to see at all time the result of his/her work, it is best to take advantage of the "Distributed" aspect of git, and have a clone of your repo used:
That would allow the designer to:
merge --squash
to) a special branch that the developer can pull from in order to get back the latest design (without getting all the intermediate commits).The point is: with a DVCS (like Git), you don't have to use only one repo for synchronization. You can have several, each with a different role.