Question: in /var/www/html/ (your moodle code root), is there a hidden .git directory already?
IF so, a simple git pull acquires updates to version running. No moving of files is required to update.
No moving of files is required to upgrade either, just a couple of git commands to change the branch.
See the links Mr. V shared with you.
I'll share one more piece of advice ... make a minimal backup (code + SQL dump of DB) before updating or upgrading. A plugin that is not compat with the higher version you are upgrading to may stop the upgrade cold.