I am trying to make a simple backup script for my remote git repositories. In the script, I have a few lines that currently look like this:
git clone git@server:repo.git $DEST tar czvf repo.tgz $DEST rm -rf $DEST
Is there a way to do all this in one line? Can I include a git clone in the tar command? I donβt need the cloned directory, I just want its compressed archive.
I tried some experiments, but can't understand the syntax.
git pipe gzip tar
bryan kennedy
source share