fixed gwip command, to use only one file optionally
This commit is contained in:
parent
7bfea6a9d8
commit
ff2b5afb49
1 changed files with 2 additions and 1 deletions
3
.zshrc
3
.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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue