Oh and I know https://github.com/permutationlock/merge-pgn exists, but it doesn't support comments.
Command line tool or any free tool to merge multiple games into one game with variations?

I never found any command line tool to do this, but https://chesstempo.com/ can be used to accomplish what I wanted. It also allows copying specific lines between repertoires, which is really useful.
However, there are a few things to keep in mind. Especially if you have arrows and marked squares in your PGN.
- You really need to clear ChessTempo of any existing repertoires because arrows and markings are shared across the white and black side. So if you have a white repertoire and a black repertoire, and make some arrows in one and export the other, then the arrows will also be exported. But as long as you remove (export to PGN) the existing repertoires you are good to go. Though, this resets any training status, which I find to be really annoying.
- Also, if you import one PGN into an existing repertoire, then positions in the PGN file that has arrows in them will overwrite any arrows in the existing repertoire if that same position exists in the repertoire. Positions which have no arrows in the PGN leaves the arrows in the existing repertoire as is. BUT, one import thing here, you need to RELOAD the page after the import or it will appear that none of the arrows from the PGN were imported. But they are!
- Another scenario is when you import a PGN with multiple games and some games have arrows and others not. Here it appears the games coming first in the PGN gets precedence. If a position exists in the first game and has no arrows and also exists in the second game but WITH arrows, it will be imported without arrows.
- I haven't tried importing a PGN with multiple games into another existing repertoire so I don't know how it works then.
- Also, normal comments in the PGN file appear to be simply merged together with any existing comments in the the repertoire.
Richard at ChessTempo.com has acknowledged that this behavior of not merging arrows completely, ie using them from both the repertoire and the PGN file feels like a bug, so I suspect it might change in the future.

So, in the end I modified https://github.com/permutationlock/merge-pgn to have support for also merging text comments and also software comments / annotation (arrows and circles etc). There are some technical caveats but it works:
https://github.com/olleeriksson/merge-pgn
This question is not just about concatenating pgn files with games in them into one file. I know how to do that.
I want to merge multiple "games" into "one game" with variations, *and* preserve normal comments and these % comments used for software annotations like arrows etc. I seem to hear that Chessbase can do this, and I think ChessTempo does it) but I would really like a simple open source command line tool or at least a standalone windows/linux tool for this. I've been reading the documentation on pgn-extract and I can't seem to find any options for doing it. Also not sure if pgnmentor is able to do this. This is driving me crazy that there is no easy way to do this.
Anyone?