Add staged file check for commit example (#269)

* Add staged file check for commit example

* fix: stage all confirmation

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
This commit is contained in:
Mathew Payne 2023-02-28 00:19:23 +00:00 committed by GitHub
parent 46dee843db
commit 83db83296a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,10 @@
#
# alias gcm='git commit -m "$(gum input)" -m "$(gum write)"'
if [ -z "$(git status -s -uno | grep -v '^ ' | awk '{print $2}')" ]; then
gum confirm "Stage all?" && git add .
fi
TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert")
SCOPE=$(gum input --placeholder "scope")