Aims. An interesting question of contemporary cosmology concerns the relation between the spatial distribution of galaxies and dark matter, which is thought to be the driving force behind the structure formation in the Universe. In this paper, we measure this relation, parameterised by the linear stochastic bias parameters, for a range of spatial scales using the data of the Garching-Bonn Deep Survey (GaBoDS). Methods. The weak gravitational lensing effect is used to infer matter density fluctuations within the field-of-view of the survey fields. This information is employed for a statistical comparison of the galaxy distribution to the total matter distribution. The result of this comparison is expressed by means of the linear bias factor b, the ratio of density fluctuations, and the correlation factor r between density fluctuations. The total galaxy sample is divided into three sub-samples using R-band magnitudes and the weak lensing analysis is applied separately for each sub-sample. Together with the photometric redshifts from the related COMBO-17 survey we estimate the typical mean redshifts of these samples withz = 0.35, 0.47, 0.61, respectively. Results. Using a flat ΛCDM model with Ω m = 0.3, Ω Λ = 0.7 as fiducial cosmology, we obtain values for the galaxy bias on scales between 1 ≤ θ ap ≤ 20 . At 10 , the median redshifts of the samples correspond roughly to a typical comoving scale of 3, 5, 7 h −1 Mpc with h = 0.7, respectively. We find evidence for a scale-dependence of b. Averaging the measurements of the bias over the range 2 ≤ θ ap ≤ 19 yieldsb = 0.81 ± 0.11, 0.79 ± 0.11, 0.81 ± 0.11 (1σ), respectively. Galaxies are thus less clustered than the total matter on that particular range of scales (anti-biased). As for the correlation factor r we see no scale-dependence within the statistical uncertainties; the average over the same range isr = 0.61 ± 0.16, 0.64 ± 0.18, 0.58 ± 0.19 (1σ), respectively. This implies a possible decorrelation between galaxy and dark matter distribution. An evolution of galaxy bias with redshift is not found, the upper limits are: ∆b 0.2 and ∆r 0.4(1σ).