Git is bad at tracking binary files. So it's not a good solution for backups. You could use something like restic, Borg or Kopia from termux
Here's a good guide on how to do it with Borg that could easily be adopted to the other tools https://neverpanic.de/blog/2022/01/25/backing-up-your-android-phone-with-borgbackup/
INS