mieweb / wikiGDrive

Wiki for Google Shared Drive
15 stars 6 forks source link

Automatically commit clean version changes #310

Closed horner closed 1 year ago

horner commented 2 years ago

Bash code:

git status | grep 'modified:' | cut -d':' -f2 | while read file
do
    if git diff --exit-code -I'^version: |^wikigdrive: |^lastAuthor: ' $file >> /dev/null
    then 
        git add $file; 
    fi
done

git commit -m "Auto commit for file version change"