I have a Git repository on a server and on the same server I have a script which needs to do a git archive
of the repository.
Here's my sample git archive
command which works well for remote Git repositories:
sudo git archive --remote=ssh://[email protected]/var/repo/myrepo.git --format=tar --output=src.tar development
What would I need to do/change to execute the aforementioned command on the same server so that I don't need to put all the SSH stuff? Since the command is running on the same machine as the repository, can I get away with directly accessing the Git directory.
Thanks
Use
cd .../yourcode
sudo git archive --format=tar --output=src.tar development
(it is probably unnecessary to sudo
)
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