#!/usr/bin/env bash
set -euo pipefail

msg="${*:-update $(date '+%Y-%m-%d %H:%M:%S')}"
branch="$(git rev-parse --abbrev-ref HEAD)"

git add -A
if git diff --cached --quiet; then
    echo "Nothing to commit."
    exit 0
fi

git commit -m "$msg"
git push origin "$branch"
