Update Git index so that it doesn't show locally modified blocks
git update-index --assume-unchanged $( git status --porcelain | awk ' $1 == "M" && $2 ~ "block.block" {print $2}' | tr ' \n' ' ' )
Update the git index to avoid some files that were modified to appear in the status list.
git update-index --assume-unchanged [file names separated by space]
> git status
modified: config/block.block.mycustomblock1.yml
modified: config/block.block.mycustomblock2.yml
modified: config/something.out.of.scope.yml
> git update-index --assume-unchanged config/block.block.mycustomblock1.yml config/block.block.mycustomblock2.yml
> git status
modified: config/something.out.of.scope.yml
Bash expression that runs a command and puts its output in its place
$( command)
> echo " Today is $( date) . A fine day."
Get a simplified list of the changes in the repo.
Filter the list to get the items we are interested in.
awk ' $1 == "M" && $2 ~ "block.block" {print $2}'
# First column matches "M"
# Second column contains "block.block"
# Print the column 2
Replace new line chatracters with spaces.