basforge

Search titles, text and the “If it doesn’t work” cases.

    RU

    An irreversible command gets a dry run first

    Before an action you can’t undo, see what it will do. git, logrotate, compose and nginx each have their own dry-run mode for that.

    What to check with

    Action Dry run
    git add git add --dry-run .
    logrotate logrotate -d /etc/logrotate.d/<file>
    editing compose or .env docker compose config --hash '*' before and after (The compose config hash)
    deleting a directory ls -la <directory> and docker compose ps -a in it — any live containers?
    nginx docker exec nginx nginx -t before reload

    A dry run changes nothing: git add --dry-run only prints the file list, logrotate -d what it would do with each file, nginx -t checks the config.