Option 1: core.worktree
Initialize a non-bare repository outside of the path you want to track and set core.worktree to the path you want to track. You can do this using terminal commands to set this value or directly edit the repository config file to add:
worktree = <path to files to backup>
Do not make the repository folder a subfolder of this path, that would be recursive. You could possibly try this and simply ignore the repository folder, but I think git won't allow this scenario.
In your case, you would go to backup/git_repos/ to run the initcommand and could use the--git-dir=./myfiles` option to override the default repository folder name. The commands would look like this:
cd backup/git_repos
git init --git-dir=./myfiles
git config core.worktree backup/myfiles
NOTE: I recently tested a great many git GUIs for windows and only Git Extensions supports using core.worktree to move the main working tree.
SourceTree, Fork, Tower, GitKraken, GitHub Desktop, GitAhead, SmartGit*, and Git-Cola. You will want to stick to the terminal when using core.worktree.
* SmartGit conflaits this feature with Option 2 and is asking for a .git file. This is not required for core.worktree.
Option 2: --separate-git-dir
Initialize a repository at the path you want to backup using --separate-git-dir=<path to hold repository data>. This will use the specified path to hold the repository data and create a .git` file in the initialization location that contains a line like this:
gitdir: <path to hold repository data>
For you, the commands would look like this:
cd backup/myfiles
git init --separate-git-dir=backup/git_repos/myfiles/
And your .git file in backup/myfiles/ will contain gitdir: backup/git_repos/myfiles/
You now operate git treating the location of the .git file as it that was the repository location.