We study the two-component repulsive Fermi gas with imbalanced populations in one dimension. Starting from the Bethe ansatz solution we calculate analytically the phase diagram for the homogeneous system. We show that three phases appear: the balanced phase, the fully polarized phase, and the partially polarized phase. By means of the local density approximation and the equation of state for the homogeneous system we calculate the density profile for the harmonically confined case. We show that a two-shell structure appears: at the center of the cloud we find the partially polarized phase and at the edges the fully polarized one. The radii of the inner and outer shells are calculated for different values of the polarization and the coupling strength. We calculate the dependence of the magnetization on the polarization for different values of the coupling strength and we show that the susceptibility is always finite.