Last active
January 4, 2025 17:54
-
-
Save jurakovic/8c0535b3b8fbc96228de1a94ea910e0d 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