The process in which the developmental fate of a cell becomes restricted such that it will develop into a stem cell.