I'm using HBCI for downloading both my bank account and the credit card account. The weekly credit card bill will be downloaded in two transactions, one in the bank account and one statement in the credit card account. What would be the correct way to handle this? Just delete one of them, or is there a way to "link" both so that one of them will be marked invalid? Please note that I'm just talking about the two CC bills when using two HBCI accounts/connections. All costs will be entered as usual.
Short answer: there is no way to 'link' the data imported from two different data files after loading them.
After loading one data file, and processing the transactions to specify the 'other side', you may have some luck then loading the other data file. GnuCash has some facility to try to match the imported transactions with likely ones found in the register, but it is not a sure thing.
If you load both data files then resolve the imbalances then you will have pairs of duplicate transactions and one of each will need to be deleted by you.