You can remember the meaning of 一共 with this easy mnemonic:
We are one (一) team and should always work together (共), and altogether we can achieve our goals.
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.