Thread:Talk:Download from Git/Upgrading using git

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