-
-
Save DavidPesticcio/481c64541374199dfd00b6f9612c89ef to your computer and use it in GitHub Desktop.
Script for notes or "changelog" repo (more info here: https://news.ycombinator.com/item?id=42489124)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git status -s | |
read -p "Press any key to show diff" -n1 -s; echo | |
git --no-pager diff | |
read -p "Press any key to stage all files" -n1 -s; echo | |
git add . | |
git status -s | |
read -p "Next: commit, enter message (optional): " msg | |
git commit -m "$(date '+%Y-%m-%d') $msg" | |
read -p "Do you want to push? (Y/n) " yn | |
if [ -z "$yn" ] || [ $yn = "y" ] || [ $yn = "Y" ]; then | |
git push | |
else | |
echo "Skip push" | |
fi | |
read -p "Done. Press any key to exit..." -n1 -s; echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment