Have you ever needed to clone a repo to a server, but scp
and git clone
were not an option?
Unlikely, I know. But I have. And bridge
is now my best friend.
- [OPTIONAL] Change
main.py
. Add yourexclusions
if __name__ == "__main__":
[...]
exclusions: list[str] = [
r'.*\.git.*',
r'.*\.md',
] # Add pattens to exclude files from copy
[...]
- Run script, specifying the path with
-p [PATH]
python3 ./main.py -p path/to/copy/from
-
Copy the contents of
bridge.py
to the server -
Make it executable and run!
chmod +x bridge.py
./bridge.py