An IFR flight plan that has you going through Class G airspace would be something you would have to intentionally plan for. In fact if you are following all the minimium IFR altitudes the only time you could enter Class G would be departure or arrival to an uncontrolled, Class G field. (assuming you are asking this question in reference to the continental U.S.)
When you call for your clearance out of a Class G field the controller protects the airspace around the airport until your clearance void time. Up until you enter Class E airspace (and generally until you are under radar contact) terrain and collision avoidance are the PICs responsibility.(again assuming this refers to the continental U.S.)