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/ ./
Copy the content to the remote location and run the below:
mkdir my-repo
mv my-repo/
cd my-repo

No comments: