כללי אצבע בעבודה עם בקרת גרסאות

עמי, מנהל הפרוייקטים חיבר מסמך עם מספר כללי אצבע למפתחים בכל הנוגע לעבודה נכונה עם ניהול גרסאות. הרי הוא לפניכם, לא נגעתי:

Some ground rules for working with a repository
First we should always pay attention to any commit, pull, and push we do and make sure everything is we expect it to be.
Here are some do(s) and don't(s):
As a thumb rule, ALWAYS PULL BEFORE PUSH!
If some time passed, since the last pull (even couple of minutes), do a PULL AGAIN BEFORE PUSH. Better be safe then sorry.
The rational behind this is that someone else might have pushed some changes during the time that passed since the last pull.
Note: We need to pull in the case we need to MERGE changes from someone else. Merging changes from all team member is the essence of team work.
It is a good practice to commit at the completion of a task so the repository reflects the progress of the project.
No need to PUSH every commit. It's ok to push several commits together (BUT ONLY AFTER PULL and MERGE).
It is a good practice to start a new task on a clean “page”, i.e., there are no uncommitted files, we did a pull (and merge if necessary) to get the latest changes from the repository, and all features are in default state.
We should always keep in mind that we know better than the machine thus check and double check before we press the button (commit/pull/push).
 
General notes:
We use the module boxes instead of Drupal's core blocks module (because we can give machine name to a block – we need it for css – and because we can export it as a feature)
We use context to place boxes (as well as other good stuff) in regions and not Drupal's core blocks module (again because we can export it as a feature).
I like order in the files as well as in the code:
All contributed modules should be in: sites/all/modules
All custom modules and features should be placed under: sites/all/modules/_custom
If we create a patch to a contributed module and/or core, place it under: sites/all/patches
Themes should be in: sites/all/themes
A sub-theme should be in the theme directory: sites/all/themes/<themename>/subtheme
It can help having different file types in different folders so:
CSS: sites/all/themes/<themename>/subtheme/css
Theme images: sites/all/themes/<themename>/subtheme/css/images
Node templates (tpl files): sites/all/themes/<themename>/subtheme/templates
Views templates: sites/all/themes/<themename>/subtheme/views
JS: sites/all/themes/<themename>/subtheme/js
etc.
If there is no specific reason to do so, we should use one feature and one custom module for the project.
Documenting the code is always appreciated.
Use Drupal functions in theming.
 
Thank you.

Have a nice day!

תגובות

פרסום תגובה חדשה

מידע נוסף על אפשרויות מבנה קלט

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
הזן את התווים המופיעים בתמונה.