The existing answers do not accurately describe the procedure for the Space Shuttle system (or, I believe, for Apollo, but I am not 100% sure of that - see note at end of answer). The propellant tanks in the Space Shuttle's External Tank (ET) were never filled with nitrogen.
The initial condition for LH2 loading into the ET LH2 tank was with the tank and lines at ambient temperature. The tank was pressurized with helium to 6 psi above ambient.
The first step is to chill down the lines leading from the storage tank to the Mobile Launch Platform (MLP), through the MLP to the tail service mast, and through the Orbiter to the ET LH2 tank. To begin this process, the ET LH2 is vented to ambient by opening its vent/relief valve. Valves are commanded open in the transfer lines so that LH2 then begins to flow from the storage sphere through the lines mentioned above into the ET LH2 tank.
Once the lines have been chilled down, "slow fill" begins. Helium is used to pressurize the ET LH2 tank to 24 psi above ambient. This pressure level is maintained by cycling the vent/relief valve as the tank is filled. LH2 then flows slowly into the ET LH2 tank until it reaches the tank's 5% level sensors.
The next phase is "fast fill", accomplished by pressurizing the storage sphere to a higher pressure and opening the transfer line valve. LH2 flows rapidly into the ET LH2 tank until it reaches approximately 85% full. At that point, the main fill valve is partially closed to reduce the flowrate. This configuration is used until the 98% liquid level sensors in the ET go wet.
At 98% the system transitions to topping - a slow fill to 100%. The transfer line valve and inboard fill and drain valve are closed, filling continues through the topping valve. The vent valve is opened, the ET LH2 tank is at ambient pressure.
Now the tank has been filled to flight level and the system modes to replenish. The main fill valve is closed and LH2 is added to maintain 100% loading and make up losses due to boiloff. This configuration will be maintained until the tank is pressurized with helium shortly before liftoff to provide the proper inlet pressure conditions for Space Shuttle Main Engine start.
A note on LH2 loading in Apollo: This document provides a sketchy description of the process, but the supplied graph clearly shows a slow fill/fast fill/topping/replenish process similar to that of Shuttle.