Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git check if there are staged changes

# bash check whether there are any staged changes in git
git diff --cached --quiet && echo nostaged || echo somestaged
 
PREVIOUS NEXT
Tagged: #git #check #staged
ADD COMMENT
Topic
Name
1+3 =