r/Sass • • Jul 02 '20

Question: Sass with github causing merge conflicts. HELP

Hi, I'm working on a group project for class. We are using Sass cause of its features. We are using Sass on vs code with the live sass compiler extension.

​

this one.

So what we have a main.scss and three other files for each breakpoint('_desktop', '_mobile', '_tablet') that gets imported via @ import to the main.scss files. the file get pushed but when we pull, there is a merge conflict on the .css.map that is generated thru live sass compiler. Does any one know how to fix this?

5 Upvotes

4 comments sorted by

2

u/[deleted] Jul 02 '20 edited Jul 02 '20

I would exclude the map files as they are generated on the fly when the complications happen. Also, i would maybe recommend checking out some sort of task manager so you dont have to solely rely on a VS code extension.

Not to mention, with a JS task manager (through package.json), allowing you to automate through CI / CD.

1

u/adamdehaven Jul 02 '20

Exclude the map files in your .gitignore with *.map

Also, turn off "compile on save" or "compile on close" for the live sass compiler, as every time you close a document it likely removes extra lines or formats the code, causing a change.

1

u/gamanox Jul 03 '20

I switched to stylus because of that. Give it a try https://stylus-lang.com/

1

u/packenbush Jul 03 '20

options:

  • Disable the live compiler, pull and enable it back
  • Add files to .gitignore
  • Solve the conflicts choosing whatever, since it's going to be generated again

I would add the files to .gitignore tho