summaryrefslogtreecommitdiff
path: root/.zk/commit.sh
blob: 55dace92bb9aa0f6119c0216cccc8eeb83803406 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash

grep $(date -I) <(git log -1) >/dev/null
if [ $? -eq 0 ]; then
  # Committed today already
  git add -A
  git commit --amend --reset-author --no-edit
else
  # New commit today
  git add -A
  git commit -m "snapshot: $(date -I)"
fi