Skip to content

Instantly share code, notes, and snippets.

@cjdenio
Last active December 3, 2020 16:15
Show Gist options
  • Save cjdenio/e7f2caadb0d5e877b475139ec7ca5465 to your computer and use it in GitHub Desktop.
Save cjdenio/e7f2caadb0d5e877b475139ec7ca5465 to your computer and use it in GitHub Desktop.
Bash script for peroidically backing up my dotfiles to https://github.com/cjdenio/config
#!/bin/bash
cd /home/cjdenio/Documents/github/config
if ! git diff --exit-code --quiet;
then
git add .
git commit -m "Update config files"
git push
else
echo "No files to update"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment