From ff2b5afb49ea31d88ecc695aee32fff48952f02c Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 12:46:23 +0200 Subject: [PATCH] fixed gwip command, to use only one file optionally --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index abbdbf2..d38d019 100644 --- a/.zshrc +++ b/.zshrc @@ -410,8 +410,9 @@ __git__() { # Check if there are any changes on the remote branch if git diff --quiet "$branch" "origin/$branch"; then local commit_message="${1:-wip}" + local commit_files="${2:-.}" echo "${CYAN}No changes on the remote branch. Adding changes and pushing with ${RED}${BOLD}'$commit_message'${NC}${CYAN} commit.${NC}" - git add . + git add "$commit_files" git commit -m "$commit_message" git push else