A tip for those of you who have a Shimano Nexus (IGH) hub: There is a little tab with a 2mm hole in it that you can use to take the tension off the hub, i.e. swivel the opening for the cable attachment nut around so it's very easy to get to. It's about 1/2" around from the opening (mouth?) for the cable attachment nut.
I learning about this from watching a YouTube video on the Nexus hub. Anyway, applicable to this thread, I now have a piece of spoke (2mm / 14 gauge) that I carry in my rack bag which makes removing and re-installing the cable attachment nut quite easy indeed!
Best Regs,
Rick / OCRR