We’ve recently implemented the personal-files interface which should be quite useful for git, particularly when the snap also plugs home and removable-media. Please try this out and comment how it works for you (note, you’ll need to follow Process for aliases, auto-connections and tracks to distribute it via the store.
I do not think this works for me. I would like my program to be run from any path. Please review for classic confinement: https://github.com/wieczorek1990/gitl/tree/15d741f660b7f6d24e67f9d923ced80eaa0601bf
You said this is a “git loop program, therefore it needs to access files under working directory”. Why wouldn’t plugging home and removable-media be sufficient?
Also, “I do not think this works for me. I would like my program to be run from any path” is not enough of a reason to grant classic confinement. In order to grant classic we need to understand the specific reasons for why strict mode is not sufficient. Please see Process for reviewing classic confinement snaps for details.