Initial commit: The Ultimate Antigravity Skills Collection (58 Skills)
This commit is contained in:
19
skills/git-pushing/scripts/smart_commit.sh
Normal file
19
skills/git-pushing/scripts/smart_commit.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Default commit message if none provided
|
||||
MESSAGE="${1:-chore: update code}"
|
||||
|
||||
# Add all changes
|
||||
git add .
|
||||
|
||||
# Commit with the provided message
|
||||
git commit -m "$MESSAGE"
|
||||
|
||||
# Get current branch name
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
# Push to remote, setting upstream if needed
|
||||
git push -u origin "$BRANCH"
|
||||
|
||||
echo "✅ Successfully pushed to $BRANCH"
|
||||
Reference in New Issue
Block a user