Monday, February 19, 2024

Sharing code without using git

Sometimes you do not want to commit to git for security reasons and yet you want to test your code somewhere else.
Run the below from your local copy of the git repository:
rsync -av --exclude-from='.gitignore' --exclude='.git' . ~/Downloads/my-repo-copy
cd ~/Downloads/my-repo-copy
zip -r ~/Downloads/my-repo-copy.zip ./
Copy the content to the remote location and run the below:
mkdir my-repo
mv my-repo-copy.zip my-repo/
cd my-repo
unzip my-repo-copy.zip
rm my-repo-copy.zip

No comments:

Followers