• Zwuzelmaus@feddit.org
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    1 day ago

    It is wrong. Git does not need a central system (although most people define one as the central). The local system has a repository, too.

    Commits go into the local repository, not outside.

    Push goes from the local repository (not from a commit that’s hanging in the air) to a remote repository (most times to the “central” one).

    There are pretty good tutorials on youtube. Just be sure to learn git itself first, and then all the website things like github etc.

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      Though you can also have multiple remotes each containing a subset or superset of your current branches and commits. Which is fun.

  • DreamButt@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    Basic workflow that got me through the learning pains.

    If I just sat down:

    • git checkout develop or whatever ur main branch is
    • git pull origin

    If I’m working on a new branch:

    (If not already on the new branch)

    • git branch -b feature/123-ticket-name

    (After making some changes)

    • git add .
    • git commit
    • git push

    Git will prompt you the first time you git push, just follow the instructions.

    And of course there’s tons more you could learn or dive into. But that should give you a stable foundation to start working from

    • NocturnalMorning@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      You’d be surprised how many people use git without knowing even the basics.

      I’ve had a surpising amount of coworkers who have come to me for an issue that I literally googled for them to just give them the answer.

  • jlow@slrpnk.net
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    I’ve tried learning git a few times and new a bit about it but this article helped me understanding it quite a bit better:

    https://www.chrismccole.com/blog/git-for-artists

    The practical bits are about Github which you obviously don’t want to use but you can still get the gist of it when using Codeberg or something similar.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    There are many many many many many git tutorials online. You literally need to stick the question into a search engine or watch a YouTube video.