How do I change Sourcetree icon shown in Dock? I have an app that is very useful, but from time to time it changes its icon in the Dock, which I found disturbing for my workflow.

I would like to prevent that as I am perfectly satisfied with the standard icon.

I've tried following the instructions in the article, How to change Mac app icons but as soon as the app starts, it changes the icon back.

I've also poked around Contents/Resources directory in the app bundle, but could not find the said icon.

Does anyone have a workaround?
If anyone is interested, the issue was Pride icon on SourceTree app. I've found the solution here: https://community.atlassian.com/t5/Sourcetree-discussions/The-way-to-change-icon-for-Sourcetree-app/td-p/1110914


Go to https://github.com/alexzielenski/ThemeEngine
Switch to releases tab (I took the latest pre-release)
Download .zip and extract it
Open the Sourcetree.app with right click - show package contents and navigate to Contents/Resources
Copy Assets.car and sourcetree.icns to any folder
Run ThemeEngine from the zip in step 3
In ThemeEngine click "Open Document" and open the Assets.car
Find the icon named Pridetree
Open sourctree.icns with your preferred app - I used preview. Clicked on second icon pressed cmd + a to select whole image and pressed cmd + c to copy it.
Clicked on first image in Pridetree ThemeEngine and pressed cmd + v to paste it.
Repeat with second image. 
Save the document
Replace Assets.car in the app Contents/Resources with modified Assets.car.


Do not forget to backup your files. Your are doing this on your own risk as I do not know if it actually breaks the EULA.