In the front-end project, the files compiled by the two computers from one gulpfile.js are different, causing the files that have not been changed to be prompted by git to be submitted.

  • same project
  • are all win10 systems
  • ide is webStorm on one side and vsCode on the other.
  • the package.json,gulpfile.js is the same as in the warehouse. (dependencies are all in the same version)
  • gulp versions are all version 3.9.1.
  • node is v8.11.3 and npm is 5.6.0.
  • gulp does not change the file name after compilation, and the file name is the same before and after compilation.

example:
multiple developers on the same project, such as push after I changed the a.js compression this time.
someone else pull the code and then modifies B. js, but he recompresses all the uncompressed js files, including a.js. (gulp"s command is to compress all the js in the js directory.)
a.js compressed files become deliverable with him.

but the packaged and compiled files are different, what is the reason?

ask for answers.

Is the specific content of the
project consistent with that of the
configuration file? there are many possibilities for you to check your code

, for example, whether your IDE is the same, whether the computer environment is the same, such as using mac, and using windows, may also be a false alarm of git. Too little information has been given now.


< H2 > is a problem with ide. < / H2 >

ide has already given a hint (only newline characters are different)
I carelessly didn't notice
clipboard.png


LF,CRLF
clipboard.png

just show off in ide and change the default configuration of line separators.
Thank you for your comments.


Please add the packaged folder to .gitignore without versioning, because this is pointless and the name of the packaged file is random each time.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35b22-2bfae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35b22-2bfae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?