Keeping multiple projects consistent

Here is a command I run to compare and streamline multiple projects.

It is run from a project which is already up to date and it requires having diffmerge available in your PATH.

TARGET_DIR="../tele-muninn"; echo '.pre-commit-config.yaml
pyproject.toml' | while read file; do echo "Comparing: $file"; test -f "$TARGET_DIR/$file" || cp $file "$TARGET_DIR/$file"; diffmerge "$file" "$TARGET_DIR/$file"; done; cd $TARGET_DIR

Once it finishes, you’ll end up in the target folder which changes can be manually reviewed and committed.