Skip to content

Instantly share code, notes, and snippets.

@adamwulf
Created January 13, 2024 04:58
Show Gist options
  • Save adamwulf/c2ef23f432f5e5b683147af8bdb93833 to your computer and use it in GitHub Desktop.
Save adamwulf/c2ef23f432f5e5b683147af8bdb93833 to your computer and use it in GitHub Desktop.
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
$(git add -A)
commit=$(git commit -a -m "checkpoint" --no-verify --allow-empty | head -1 | sed -E 's/\[([^ ]*) ([^] ]*)(.*)/\2/')
$(git reset HEAD~1 > /dev/null 2> /dev/null )
printf "${GREEN}checkpoint $commit${NC}\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment