In time of hostilities, it is important t keep your available credits to a minimum, to reduce the other player's profit from pillaging your bases. It is also important to have credits when you need to build something, so how can you have credits available to you and not to an attacker?
One way to do this is to build 1-6 research labs on bases where you do not normally do research. As you get available credits, start a research project on one of these banking bases, the more expensive and longer the better. As you get more credits, cancel the current one and start a more expensive one. These may take you several hundred hours on these bases, but that is the point. When you are ready to spend the credits, cancel the research and it is ready for you right then, with no loss.
Another way is to produce goods. This is not as effective, but it does offer you a chance to make a small profit (1 credit for each goods produced). The down side of this is that you have to wait for the production to be completed before you can use the credits, or you will lose 25%(?) of the investment if you cancel them early. I only use this in time of peace when I am waiting to start an expensive construction project and can wait until the goods are finished.
I hope this help you in the future.