From db1405412dd0d01b4e9f1e2c600229b3af249c4e Mon Sep 17 00:00:00 2001 From: Graham Hall Date: Thu, 2 Jan 2025 10:03:49 -0500 Subject: [PATCH] 2025-01-02 10:03:49 --- scripts/commit-dotfiles.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/commit-dotfiles.sh diff --git a/scripts/commit-dotfiles.sh b/scripts/commit-dotfiles.sh new file mode 100644 index 0000000..12710ba --- /dev/null +++ b/scripts/commit-dotfiles.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Navigate to the repository +cd ~/dotfiles || exit + +# Check for changes +if [[ $(git status --porcelain) ]]; then + # There are changes, commit them + git add . + git commit -m "$(date +"%Y-%m-%d %H:%M:%S")" + git push +else + echo "No changes to commit." +fi