23

I'm a hobbyist and butcherer of python code. Quite often i'm jumping between multiple laptops / desktops playing around with different projects. Just wondering what the best workflow is or suggestions people have around syncing projects so I can edit and work on projects regardless of the computer. Is this something that people generally manage through github?? Thanks in advance for the thoughts!

top 16 comments
sorted by: hot top new old
[-] towerful@programming.dev 2 points 4 hours ago

Git. Git git git.
If it is text and can be modified from multiple places, should have a single "main" branch and feature work done independently on separate "branches". Or even just a "back this up".
Git.

Git is text based version control (tho it will do binary file, just not elegantly).

So yeh, git.
GitHub is easy to host on, but owned by Microsoft and is somewhat proprietary (by the time issues and other enhancements GitHub provides), but at the end of the day it is git with authentication and is on the ol "cloud".
Plenty of ways to replicate this if it's just for you

[-] fruitcantfly@programming.dev 1 points 4 hours ago

I use Mega(sync) to keep my various PCs in sync. Before that I used SpiderOak for a number of years, but the service started degrading at some point, which forced me to switch.

While committing to a git host is not a bad idea, it doesn’t cover all the stuff you might want to sync in my experience

[-] beeng@discuss.tchncs.de 2 points 5 hours ago

Even though there are other ways to solve it, git is the right learning path.

[-] solrize@lemmy.ml 5 points 7 hours ago

Just use git and a remote repo. Don't need GitHub or anything of that sort.

[-] RonSijm@programming.dev 2 points 6 hours ago

I don't think this has been mentioned, but it kind of depends on where your multiple laptops / desktops are. Is this always on your own home network? Because in that case you don't even need a remote service like Github

If so, you can create a network drive on any of the devices - mount the network device on your other devices, and then create a local git repo there. Just remember that using an external git service is also a backup. So if you do everything locally, make sure to have your own backups in place

A much, much worse but also possible solution is to just put your projects into onedrive/dropbox/gdrive and sync it everywhere. It works for syncing, since you're saying that's the main objective - but you lose out on version control

[-] Michal@programming.dev 1 points 5 hours ago

I used to use Dropbox for this, and it works, it's automatic, so you'll have the latest copy without manually pulling changes.

However, for any non-throwaway code i use git now. It gives me granular edit history via commits, branches for experimental changes, and i can push it to github where i can run tests and deployments for free. However if you're using git, you still need to run commit, push, pull commands but if you use an IDE or even a modern editor, it'll have hot keys for it already.

Also there are files you're not supposed to commit, like binaries and 3rd party dependencies so you may need to setup a virtualenv and run pip install on each machine independently.

[-] swicano@programming.dev 3 points 7 hours ago

I'll add one more perspective: git is the "right" way to do it, but I'm a lazy forgetful person who wants to work on the laptop but the changes on the desktop aren't committed or pushed remote. What I often do is to use VScode's remote development tools to open a remote connection the last computer with uncommitted changes, and work like that. If I'm headed out, I'll use the remote connection to commit the code so I can access it off my home network via codeberg.org.

Occasionally if I'm already out, I've even used "raspberry pi connect" to remote onto my network, then ssh over to my desktop, then commit and push. Don't do that though. That'd be irresponsible.

[-] entwine@programming.dev 2 points 6 hours ago

Just set up wireguard and use that to connect to your home network when you're out.

[-] jollyroberts@jolly-piefed.jomandoa.net 22 points 16 hours ago* (last edited 16 hours ago)

Git version control.

Codeberg is another good service I have not seen mentioned yet.

Edit: typo

[-] towerful@programming.dev 1 points 4 hours ago

Codeberg is git?
It's not GitHub! But fundamentally, it's git

[-] GammaGames@beehaw.org 1 points 7 hours ago* (last edited 7 hours ago)

codeberg requires everything to be open source and only allows private repos that support open source projects

interesting, I did not know that. piefed is on there so that has been my main interaction with the service. i use gitlab for my personal private repos.

[-] hoppolito@mander.xyz 1 points 6 hours ago* (last edited 5 hours ago)

You can have a couple of private repos on codeberg no problem, it's just that if you start using a lot of HDD space for them without also contributing stuff that they don't like it

So it's technically true that if you never contribute to any projects they don't love private repo-only accounts, but it's a pretty relaxed rule.

Nevertheless a good list of other forgejo instances is e.g. here.

[-] Midnitte@beehaw.org 18 points 16 hours ago

Yes, using a remote code repository (i.e. git) - plenty of options aside from github.

Merely git pull the repository to whatever machine you want to work on and commit the changes back (rinse, repeat)

[-] japemasterBrad@piefed.social 14 points 16 hours ago

Git is the way. I run a Gitea instance so all my code lives on my home server but have used Github in the past.

[-] 14th_cylon@lemmy.zip 8 points 16 hours ago

yes, it is something people generally manage through git. github or gitlab (if you want to avoid microsoft)

this post was submitted on 05 Feb 2026
23 points (100.0% liked)

Python

7727 readers
59 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS