We need a way to ignore compiled css and js assets when working in development branches including master so developers are not stepping on each others toes when committing and merging development branches.
Create a general .gitignore file for standard ignores. In this file we ignore the usual suspects (e.g.: node_modules, .DS_Store and IDE configuration files and folders.)
Then create a .gitignore.default file containing the paths to files and folders to be excluded in development branches. (e.g.: compiled plugin and theme dist folders.)