We use the VIMOS VLT Deep Survey to study the close environment of galaxies
in groups at 0.2 <= z < 0.95. Close neighbours of L_B >= L*_B galaxies (Me_B =
M_B + 1.1z <= -20) are identified with Me_B <= -18.25 and within a relative
distance 5h^-1 kpc <= rp <= 100h^-1 kpc and relative velocity Delta v <= 500
km/s . The richness N of a group is defined as the number of Me_B <= -18.25
galaxies belonging to that group. We split our principal sample into red,
passive galaxies with NUV - r >= 4.25 and blue, star-forming galaxies with NUV
- r < 4.25. We find that blue galaxies with a close companion are primarily
located in poor groups, while the red ones are in rich groups. The number of
close neighbours per red galaxy increases with N, with n_red being proportional
to 0.11N, while that of blue galaxies does not depend on N and is roughly
constant. In addition, these trends are found to be independent of redshift,
and only the average n_blue evolves, decreasing with cosmic time. Our results
support the following assembly history of L_B >= L*_B galaxies in the group
environment: red, massive galaxies were formed in or accreted by the dark
matter halo of the group at early times (z >= 1), therefore their number of
neighbours provides a fossil record of the stellar mass assembly of groups,
traced by their richness N. On the other hand, blue, less massive galaxies have
recently been accreted by the group potential and are still in their parent
dark matter halo, having the same number of neighbours irrespective of N. As
time goes by, these blue galaxies settle in the group potential and turn red
and/or fainter, thus becoming satellite galaxies in the group. With a toy
quenching model, we estimate an infall rate of field galaxies into the group
environment of R_infall = 0.9 - 1.5 x 10^-4 Mpc^-3 Gyr^-1 at z ~ 0.7.