Search code examples
matlabsimulinkgitignore

What files should I add to the .gitignore when using MATLAB and Simulink?


I would like to know what files I should add to the .gitignore file when I am using MATLAB and Simulink.

Should the files slx.original be added?


Solution

  • Github has a nice gitignore repo

    Specifically for Matlab projects, the template is:

    ##---------------------------------------------------
    ## Remove autosaves generated by the Matlab editor
    ## We have git for backups!
    ##---------------------------------------------------
    
    # Windows default autosave extension
    *.asv
    
    # OSX / *nix default autosave extension
    *.m~
    
    # Compiled MEX binaries (all platforms)
    *.mex*
    
    # Simulink Code Generation
    slprj/
    
    # Session info
    octave-workspace
    
    # Simulink autosave extension
    .autosave