aboutsummaryrefslogtreecommitdiff
path: root/bin/jfc
blob: 33d0fe5d5e8f7ec604151344d8b6399d4ffa508b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# Commit all changes to a Git repository with a stock message message

# Enter the given directory, default to the current one
cd -- "${1:-.}" || exit

# Check if there are any changes; if not, don't proceed (but it's not an error)
grc || exit 0

# Add all changes
git add --all || exit

# Quietly commit with a stock message and use its exit value as ours
git commit --message 'Committed by jfc(1df)' --quiet