This function updates the references in the local reference storage to match the ones in the remote. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>