Thread:Project:Support desk/Upgrading using git

I have to confess I have asked this question on https://www.mediawiki.org/wiki/Talk:Download_from_Git too, but I'm repeating it here in case there is more chance of an answer.

If I have downloaded version X using git, how do I upgrade the files to version Y using git? Which of these two options?

1. git checkout  -- source: https://www.mediawiki.org/wiki/Download_from_Git#Switching_to_a_different_version

Or

2. If using Git, export the files into a clean location, and then copy the old customized files into the new location as described on the previous section. -- source https://www.mediawiki.org/wiki/Manual:Upgrading#Using_Git

Is option 2 just for the first time you use git?

Thanks