aboutsummaryrefslogtreecommitdiff
path: root/bin/jfc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/jfc.sh')
-rw-r--r--bin/jfc.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/jfc.sh b/bin/jfc.sh
new file mode 100644
index 00000000..3d155aca
--- /dev/null
+++ b/bin/jfc.sh
@@ -0,0 +1,13 @@
+# 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