#How do people handle working with git
1 messages · Page 1 of 1 (latest)
I ended up having ChatGPT write me a simple build/deploy script:
import subprocess
def sync_files(source_path, destination_path, include_lib=False):
exclude_files = ["Makefile", ".vscode", "deploy.py", "__pycache__"]
if not include_lib:
exclude_files.append("lib")
exclude_args = [f"--exclude={file}" for file in exclude_files]
command = ["rsync", "-av", *exclude_args, source_path+"/", destination_path]
subprocess.run(command, check=True)
source_path = "."
destination_path = "/VOLUMES/CIRCUITPY"
sync_files(source_path, destination_path)
There isn't a great workflow with git, in my opinion. To sync your code with your device, check out circlink: https://github.com/tekktrik/circlink