1

I use git for revision control of my Salesforce metadata.

I often make minor changes (adding or removing a class, field, etc) that have massive repercussions on all PermissionSet and Profile metadata files. My colleague makes similar changes at the same time as I do.

Currently, when I make such a change, I carefully git add -i only the changes I wish to commit. This is repetitive since the changes are all the same.

Has anyone written a script that only adds the changes that look like a particular regex, or anything to ease this sort of monotony? E.g.:

> git add-regex -- profiles/ permissions/ << EOF
<pageAccesses>
    <apexPage>MyShinyPage</apexPage>
    <enabled>.*?</enabled>
</pageAccesses>
EOF
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.