Is it safe to undo during a "git fetch"?

I just started a fetch

large remote git repository. Unfortunately, after doing this, I realized that due to poor connection it would take several hours. Is it safe to issue ctrl-C (or else kill the git process) and try again later with a better connection? Or is there a risk of problems due to this - my local repo remains in a corrupt state or something?

+3


source to share


1 answer


It should be safe.



git fetch

at first it just transfers new objects. After everything is loaded, it will set the remote ref to re-fix the head. If you interrupt it during the download phase, it still doesn't change to all links. Therefore, everything should be fine.

-1


source







All Articles