F
F
freeman02042016-06-15 22:46:23
git
freeman0204, 2016-06-15 22:46:23

How to work with gulp + git if I'm typesetting, and another person is pulling on wordpress?

To begin with, I can already create a repository, change the file to upload to bitbucket and download from it.
But I have many questions.
1. If I have a source folder and a build folder (where the finished site goes). Do I need to initialize git only in the build folder? In this folder there are jikveri and similar libraries, do you need to add them and the repository? I will not edit the library and make commits there. Or you still need to include them in the repository.
2. What comments should be given to commits? Are there rules? So that you can easily navigate later. I would like to see an example of a small similar project, how it's all implemented.
3. I finished the layout and gave it to the person for a stretch on the vp. Wp itself has many files. What files should be added to the repository, only the theme folder?
4. It is not yet clear in what cases it is necessary to create a new branch and when it is necessary to merge an additional branch with the master? I know the basics of the git, but it is not yet clear how to apply it all so that it would be useful.
5. Now we are working like this, there is a repository on both computers and on bitbucket. How to make sure that the repository is stored by all developers on a PC on bitbucket and at the same time it is possible to work through the deployment immediately on the test server?
Thanks in advance! I would appreciate any advice :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Khokhlov, 2016-06-16
@freeman0204

Already answered a similar question, but about Bitrix, but I can’t find it. Let me tell you how we do it.
Here is the structure:
As you can see, wordpress itself is not stored in the repository (as well as plugins that are installed from the list of dependencies on a new machine in a couple of clicks).
The layout is in src (scss and jade are used) and is collected in the static folder - from which all statics are included in WordPress. HTML files are collected in the _v folder.
The meaning of this approach is that layout lives with the project. For example, you need to fix something in the styles - the layout designer calmly edits the sorts, sees how it looks on the layout - if everything is ok, pushes the changes and uploads them to the server.
Если нужно добавить новую страницу - верстальщик верстает в jade, потом программист сольёт его изменения, соберет проект, возьмет из папки _v нужный шаблон и натянет его на wp.
Очень сильно стараемся изменения в шаблонах переносить в исходники верстки, т.е. сохранять её актуальное состояние на протяжении всего проекта.
UPD: Про ветки. Всегда есть master и markup (верстка) + могут быть ветки отдельных программистов / фич и т.д. В мастер изменения сливает только тимлид/техлид/самый-главный-программист.

E
Evgeny Vlasenko, 2016-06-23
@mahnunchik

WordPress theme template based on HTML5 Boilerplate, gulp and Bower:

  • Repository https://github.com/roots/sage
  • Detailed documentation https://roots.io/sage/docs/theme-installation/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question