wip
This commit is contained in:
parent
aeca1cf43f
commit
8d795ad707
1 changed files with 15 additions and 12 deletions
|
@ -530,21 +530,24 @@ __git__() {
|
|||
;;
|
||||
esac
|
||||
|
||||
[[ -z "$commit_files" ]] && commit_files=.
|
||||
[[ -z "$commit_message" ]] && commit_message=wip
|
||||
if [ -n "$commit_files" ] || [ -n "$commit_message" ]; then
|
||||
echo "${CYAN}No changes on the remote branch. Adding changes and pushing with ${RED}${BOLD}'$commit_message'${NC}${CYAN} commit.${NC}"
|
||||
|
||||
echo "${CYAN}No changes on the remote branch. Adding changes and pushing with ${RED}${BOLD}'$commit_message'${NC}${CYAN} commit.${NC}"
|
||||
[[ -z "$commit_files" ]] && commit_files=.
|
||||
[[ -z "$commit_message" ]] && commit_message=wip
|
||||
|
||||
if (("${#commit_files}" <= 1)); then
|
||||
git add $commit_files
|
||||
else
|
||||
for f in "${commit_files[@]}"; do
|
||||
git add $f
|
||||
done
|
||||
fi
|
||||
|
||||
git commit -m "${commit_message:-wip}"
|
||||
git push
|
||||
|
||||
if (("${#commit_files}" <= 1)); then
|
||||
git add $commit_files
|
||||
else
|
||||
for f in "${commit_files[@]}"; do
|
||||
git add $f
|
||||
done
|
||||
fi
|
||||
|
||||
git commit -m "${commit_message:-wip}"
|
||||
git push
|
||||
else
|
||||
echo "${RED}${BOLD}There are changes on the remote branch. Please pull the latest changes first.${NC}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue