Support

Account

Home Forums ACF PRO Working with git/branches/acf json Reply To: Working with git/branches/acf json

  • I think that the only way you could do this would be to delete and re-import the field groups each time.

    ACF does only read from the JSON if it exists, but not when editing a field group. In this case it only reads from the database. But ACF will write to the JSON files when you update including all fields that are in the database for the group. I don’t know that there is any way to prevent ACF from doing this or doing what you want.

    So basically
    1) Create Branch
    2) Delete all of the field groups, maybe just the ones changed in some other branch)
    3) Import the effected field groups, You can import them directly from the ACF JSON folder. Also, I think, but I’m not sure, that field groups that are in the acf-json folder but do not exist in the database may be available for sync.