The battery cable is of decent length for most projects. Unfortunately, we need to cram things into very tight spaces. The stock cable is just too long to fit into the 3D printed case. So we'll desolder the cable from the battery, trim the wire short and rewire it back to the battery.
Rewiring Battery Cable
I started by carefully removing the layer of kapton tape that's over the voltage and ground pads on the battery. You can also peel back the tape if you'd like to preserve it. I added a fresh piece of kapton tape back over it but if you don't have any, go with the ladder. I secured the battery to my work surface using blue mount tack. Using the tip of the iron, I carefully heated up one pad (not both at the same time!) and slowly pulled the wire away. Then, repeated that process for the second wire. With the cable now free, I cut the wire down to 35mm in length. Strip and tin the two wires. I attached them back to the battery. Follow the + and – labeling on the battery for the voltage and ground connections. The cable is oriented to accommodate for the enclosure.
If you don't have any kapton tape on hand, I suggest getting some as they can be handy for future projects. I normally use it to insulate exposed pads on the bottom of PCBs. This helps prevent things from accidentally touching and shorting out. This stuff also handles high temperatures. It's used a lot in different applications like aircrafts, spacecrafts, and x-rays. You'll find this stuff in electronic manufacturing and 3D printing.
Now we can plug in the battery to the GEMMA M0. Double check the polarity and make sure the connections are routing correctly – positive to positive, negative to negative. The GEMMA M0 has + and – symbols near the male JST connector.