A
A
Andrew Chil2017-05-31 08:58:22
PHP
Andrew Chil, 2017-05-31 08:58:22

How to resolve Sass/sourcemapce conflict in git?

Good afternoon! I have the following question.
There are two front-end developers on the project, respectively, two write css (in this case, sass), in sass there are sourcemaps that always conflict in git. Please tell me how this problem is solved, how to add this part to ignore? (deleting sourcemaps is not an option)
Or how is this organized correctly on a large project?
I would be very grateful for your help!

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
romaaa32, 2018-09-14
@romaaa32

I did this: $array = $arr2+$arr, i.e. merged backwards, $arr2overwrites $arr, I need it that way.
I don't know how correct this is, but it works.

I
ItsCoder, 2018-09-14
@ItsCoder

array_merge($arr, $arr2);

M
miki131, 2018-09-14
@miki131

array_merge_recursive

A
Alexander Pushkarev, 2017-05-31
@chil

Add file to .gitignore?

E
Eugene Volf, 2017-05-31
@Wolfnsex

Please tell me how this problem is solved, how to add this part to ignore?
Create a .gitignore file and add everything unnecessary there, incl. CSS, SourceMaps and all other auto-generated nonsense. Resp. after that, remove s.map from the repository history (completely).
In production, or before submitting a layout for review, deployment, or similar events, all the necessary files (usually this refers to CSS, not s.map) are collected / generated either by the last developer (who submits), or any build system that you are using.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question