Ignore some files using a pattern

unison

  • Bidirectional file synchronisation tool.
    More information: <https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

unison {{path/to/directory_1}} {{path/to/directory_2}} -ignore {{pattern}}

click the source code to copy install unison on any operating system with command-not-found.com