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