IMac – Changing sublime text 3 icon in dock on Yosemite

iconimacmacossublimetext

I tried to change the Sublime Text 3 icon on the dock changing the Sublime Text.icns file in path /Applications/Sublime\

Now in the dock appears the default app icon (the one for apps that doesn't have an icon).
How can I resolve it?
Also restoring the original Sublime Text 3 icon, and after restarting dock (with killall -KILL Dock) nothing happens.

Best Answer

Here is a easy way to change the icon.

Remove Sublime Text from your dock.

Open two finder windows. One with Applications and one in the folder with the new icon. Like so:

Folders

Then click on Sublime Text and press CMD + i, this will bring up the Info Window for the App (Sublime Text). Like so:

Sublime Text Info Window

Now, it's as easy as this: Drag and drop the new icon onto the small icon to the left of the App name (Sublime Text) in the top left hand corner of the Info Window. You should see the icon for both the app and the preview change to the new icon you just dragged.

Then drag Sublime Text from the Applications window over to the dock, and it will appear with the new icon.

Like so:

enter image description here