How to continue bash script if git nothing to commit

sreginogemoh

I do have this command in my bash script:

command 1
git add .
git commit -m "Update packages"  //stop here if nothing to commit
command 2
... 

I do run a number of commands in my script, however when git commit results in nothing to commit, working tree clean the script execution stop.

How would you continue excecution if nothing to commit?

ThilankaD
git commit -m "Update packages" || true

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related