```
git ch -b testbranch # we assume we're not writing changes directly on master
./automated-commits.sh # errors as expected
bitcoind &
PID1=$!
bitcoind --testnet &
PID2=$!
DIFF_NAME=update-chainparams ./automated-commits.sh # succeeds, but as a dry-run
sudo kill $PID1
git ch testbranch
DIFF_NAME=update-chainparams ./automated-commits.sh # fails, leaving uncommitted changes
git stash
git ch testbranch
git pop # test with dirty source tree
bitcoind &
PID1=$!
DIFF_NAME=update-chainparams ./automated-commits.sh # succeeds, but as a dry-run
sudo kill $PID1 $PID2
```