My advice is: Don't walk into the dealership until you have a price offer from them on paper.
Here is how I buy a brand new car. This method works really well so long as you a.) can overcome falling in love with the car and b.) don't mind being perceived as a bit of a dick by the dealer. This process is actually very stress free and enjoyable.
1. Research the car thoroughly. Pick a reasonable combination of options, usually they are packaged together. Figure out specifics like color. Find out the invoice price on cars.com. You should shoot for around invoice, sometimes you can get lower but not always.
2. Arrange your own financing through someplace like Capital One Auto so you have funds.
3. Wait until the last few days of the month. The sales folks are pressed to meet their monthly goals.
4. Engage at least 6 dealerships who carry the make you want. You may have to buy from a nearby town. Tell them the exact make, model, color and options. Tell them you are a cash buyer with no trade in. Ask for their best offer, in writing, including all dealership and handling fees. Tell them you are a serious buyer with cash ready, and that you will be buying a car if the price is right.
5. Be friendly but extremely firm in your negotiations. Half of them will refuse to negotiate over email/phone. Cross those off your list. Of the dealerships who make an offer, take the best one and send it back to all the other dealerships who made an offer. Don't let them know which dealership it is from. Ask them to beat it, and tell them you are going to go with the best offer. Get it in writing over email.
6. Inform the winning dealer, and confirm the offer over the phone. Make an appointment. Take your offer in with you. Refuse any additional dealer charges or extras. Negotiate a trade-in at this point separately.
7. Give the dealership a chance to beat the rate on your financing.
8. Buy your car.
9. NOW you are allowed to fall in love with it
I don't know about the govt rebate programs but I would definitely look into those. Remember to negotiate that stuff, and any trade-in, separately, and AFTER you have agreed on a price.
I have bought new but right now I prefer certified used. The process is similar except you target specific cars in dealer inventories and set a target price. That is fun because you have to haggle the price down and you really don't know what they paid for it.