How do you let multiple developers work on the same Forge app?

This is something that has been bugging me for quite a while now and today I finally came up with a simple and clean solution that seems to work (if you’re using git and on a Linux system) while we’re waiting for Atlassian to provide proper appId sharing.

In the directory where your manifest.yml is, place (or add to if it already exists) a .gitattributes file with the following content:

manifest.yml filter=setid

Then, in your .git/config file, add a block like this:

[filter "setid"]
    clean = sed 's:app/<your-own-appId>:app/<the-appId-in-git>:g'
    smudge = sed 's:app/<the-appId-in-git>:app/<your-own-appId>:g'

This will make git call sed to do a find-and-replace on the appId on every invoke (push, commit, checkout, …). Your own appId will live on your disk, but the committed appId will remain in the git repository.

You can safely commit the .gitattributes file, if git doesn’t find the filter in your config, it just seems to ignore it so this also shouldn’t break any CI/CD you have setup.

This probably won’t work out of the box on Windows or MacOs systems but it should be enough information to get you started.

15 Likes