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!

  • rompe@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    20 hours ago

    One more thing regarding Git:

    You’ll likely want to keep your main branch functional at all times, so you would normally wait with your commit and push until a feature is ready. This wouldn’t mix well with switching machines at random times.

    That’s where branches come in handy: create a feature branch, commit and push as often as you want. If the feature doesn’t happen to work out, just delete the branch. When the feature is ready, merge the branch into the main branch. There even is an option to squash commits into a single one when merging, so you don’t have to keep the whole commit history you created in the feature branch.