refresh repository from head