I don't think it matters which gear because there should be two preceding factors which should keep your car from even moving when parked on a hill:

1) Turning you front tire at an angle so it's touching the curb

2) Setting the parking brake