I'm trying to hack git to do backup for me. The data is so large relatively and I cannot afford a working copy and a git repo on any of my hard drives.
So, I need to git add/commit to a bare repo from a non-git folder.
Goal: commit from hard drive 1 to hard drive 2
No need for a bare repo.
you can specify a different git folder:
git --git-dir=/other/drive/some/path add
alternatively you can specify a different working folder:
git --work-tree=/other/drive/some/path add
or combine them together to execute from arbitrary location.
Beware that not all commands work with this parameter. Stash is one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With