2 ways
1 if the cut cable is close to machine you can buy a 2 pin, 2 piece in line connector and remake the connections
WARNING THE ONE HALF OF THE CONNECTION WITH THE PROTRUDING PINS (MUST BE FITTED TO THE APPLIANCE).to prevent electric shock
2 you can open the hedge trimmer body may have to buy some small spade connectors and remake the ends refit the new cable ends to where the old ones are