• Zeth0s@lemmy.world
    link
    fedilink
    arrow-up
    25
    ·
    edit-2
    1 year ago

    I never push as last thing in the evening. I want to sleep over it and revise in the morning. --amend crew unite

    • SokathHisEyesOpen@lemmy.ml
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      You should be pushing feature branches as you work on them, so if you have a crash or something, your work isn’t lost. Builds should be triggered from pull requests on the main branch, if triggered by anything. You should never push directly to main. At least that’s my preference.

      • TheManuz@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I make WIP branches only for that purpose, so I can push half done work and rework it the day after.

        This means a lot of history changes, but only in the WIP branch.

        When history is clean, I rebase the feature branch.

        Is this a good practice? I never found a better way to backup partial code.

    • Michal@programming.dev
      link
      fedilink
      arrow-up
      0
      arrow-down
      2
      ·
      1 year ago

      What if while you sleep over it your laptop gets stolen or damaged? I’d rather push every small change than sit on it.

        • Michal@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          On one occasion i had to take over a task from a colleague while he was on his day off. He did not push his changes. I am sure he had backups but when i asked him to push his changes he had to drive home to do it.

          I’d rather company IP stays on its git server.