How can you prevent hereditary breast cancer?

Risk assessment. If you are concerned about an inherited predisposition for cancer, you should visit a health professional with expertise in cancer risk assessment who will do a good interview, a physical exam, and a thorough family history. Based on that he/she will decide what tests to order and what to do to reduce your risk. It is not a cookie cutter approach. Best regards.
Complicated. It first depends on the type of genes that give you the risk of breast cancer. Once the type of hereditary cancer is identified there is a discussion of options. Treatment options will almost always include some form of surgery and frequent surveillance. There are some medicines that are good at reducing but not eliminating risk. While not necessary some people opt for removal of both breasts.
3 options, currently. Women who are brca (+) have a 50-80% lifetime risk of breast cancer. The 3 best options currently are: 1-prophylactic bilateral mastectomy (+/-reconstruction); 2-chemoprevention with tamoxifen, which may reduce the risk of cancer by 25-50%, and; 3-close surveillance evaluation, including regular breast mri. Unfortunately, none of these options are ideal-hopefully a better option is on the horizon.
You can't. If you have a brca gene mutation, best option is to discuss the situation with a medical/surgical oncologist. Prophylactic mastectomy can remove the tissue at risk, but close monitoring with mammogram, ultrasound, or MRI are also options. Brca patients are also at risk for ovarian cancer too. Best to have formal evaluation with your doctor to discuss your personal situation.
Prevent. If it is hereditary you can prevent it by having mastectomies, or in other words eliminating all breast tissue. If you want to keep your breasts and take a chance, then monitor your breast closely.