git will update files that need updating ... not entire file but the parts/pieces. It will also remove/delete files no longer needed as well as add files that are needed.
When using git pull to update a site, the output should show something like this (this is a 3.10 but any version should show similar):
Fast-forward
admin/tool/customlang/locallib.php | 17 +++++++++--
.../task/send_mnet_profiles_data_removed_notification.php | 45 +++++++++++++++++++++++++++++
admin/tool/moodlenet/db/upgrade.php | 19 ++++++++++++
admin/tool/moodlenet/lang/en/tool_moodlenet.php | 15 ++++++----
admin/tool/moodlenet/version.php | 2 +-
install/lang/my/error.php | 1 +
install/lang/my/moodle.php | 1 +
install/lang/sk/error.php | 3 +-
lang/en/user.php | 4 +--
lib/mlbackend/python/classes/processor.php | 2 +-
version.php | 4 +--
11 files changed, 98 insertions(+), 15 deletions(-)
You can see above the file:
admin/tool/moodlenet/db/upgrade.php had the most change ... 45
At the very end before the summary, on should always see that last line ... version.php and from what I've observed it's always 4 +--
And to verify it's the version you expect, one could issue:
fgrep '$release' version.php
from the root of the code directory
You could finish the update via:
php admin/cli/upgrade.php --non-interactive
That upgrades the DB tables.
In this example:
-->System
++ Success (0.69 seconds) ++
-->tool_moodlenet
and the last thing that it does is:
== Setting new default values ==
That last step usually has a long pause ... so don't get nervous!
then take site out of maintenance mode:
php admin/cli/maintenance.php --disable
and while there ... run cron with
php admin/cli/cron.php
and then also purge the caches
php admin/cli/purge_caches.php
Then check the site with graphical.
All in all - git is by far the best way to update or upgrade a moodle!
'SoS', Ken