Skip to content

briananders/two-way-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

two-way-merge

This merge tool simply merges two directories into each other. When there is a conflict, the merge takes the file with the later modified date.

Any file that ends with .delete will flag the file as requiring deletion. For instance dirA/path/to/file.delete will delete dirA/path/to/file, dirB/path/to/file, dirA/path/to/file.delete, and dirB/path/to/file.delete

Installation

npm i -g @briananders/two-way-merge

Usage

twowaymerge merge path/to/directory path/to/another/directory

In a crontab chron job, you have to link absolutely as your PATH is empty.

DO NOT DO THIS: twowaymerge merge "~/Google Drive/configs" "~/configs"

Do this: /Users/briananders/.nvm/versions/node/v17.5.0/bin/node /opt/homebrew/lib/node_modules/@briananders/two-way-merge/index.js merge "/Users/briananders/Google Drive/configs" "/Users/briananders/configs"

Dev Setup

  1. Clone the repo
  2. Install dependencies npm i
  3. Globally install the module npm i -g

About

Merges two directories into each other

Resources

Stars

Watchers

Forks

Packages

No packages published