Feb 21 2014
How to avoid git conflicts when working with a team?
A new team member started working on the same project as me the last week.
After checking their first commit, I noticed they mixed refactoring with eclipse auto-formatting. What made this an even worse transgression was that they have a custom maximum character width defined in their editor. I am not against aggressively formatting or refactoring code – except when it is related to critical production code.
GIT diff unfortunately cannot handle these kinds of source refactoring changes and lists the whole file as changed. See: http://stackoverflow.com/questions/21897386/git-diff-ignore-all-linefeeds-between-revisions
After reading I came across the following gem on stackoverflow (How to avoid git conflicts when working with a team? from User Christopher) which I quote/steal from.
Ask your team three questions:
- Do we enforce whitespace conventions?automatically finalize parameters.
- Do we generate textual build artifacts? For example, do we minify js, generate css rules from
.sassor.scssfiles, or build xml configurations on the fly? Do we check them in?[…]These three things cause the vast majority of our collective conflict pain:


Apr 8 2014
Quickly find all php short-tags (<?= )
I found a webapplication running on linux where the previous developer had been using shortcodes <? instead of the universally enabled <?php ( see http://stackoverflow.com/questions/1386620/php-echo-vs-php-short-tags for more info) .
Unfortunately this caused the php code to not function unless shortcuts are enabled.
By Menelaos Bakopoulos • Programming 0