• expr@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Good luck doing anything remotely complicated/useful in git with an IDE. You get a small fraction of what git can do with a tool that allows absolutely 0 scripting and automation.

      • derpgon@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        It sounds like you don’t speak from experience. I have all the automation I need. It supports git hooks on top of IDE-only features like code checking.

        If I have to fire up my CLI for some mass history rewriting (like changing an author for every commit), or when the repo breaks - so be it. But by not using the CLI I save my fingers and sanity, because committing a bunch of files is several click away with little to no room for error.

        I can rebase, patch, drop, rename, merge, revert, cherry pick, and solve conflicts with a click of a button rather than remembering all the commands and whatnot.

    • traches@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      10 months ago

      Title text: If that doesn’t fix it, git.txt contains the phone number of a friend of mine who understands git. Just wait through a few minutes of ‘It’s really pretty simple, just think of branches as…’ and eventually you’ll learn the commands that will fix everything.

      • popcar2@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago
        • git pull

        • git add *

        • git commit -m “Some stuff”

        • git push

        And occasionally when you mess up

        • git reflog

        • git reset HEAD@{n} (where n is where you wanna roll back to)

        And occasionally if you mess up so hard you give up

        • git reset --hard origin/main

        And there you go. You are now a master at using git. Try not to mess up.

  • criticalimpact@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    10 months ago

    CLI
    Though I will admit it took me a while to get there
    git add -i is where the true magic begins

    • Rikudou_Sage@lemmings.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      10 months ago

      Must be an interesting work if you never add, commit or push.

      Edit: How the hell did you get the repo without clone?

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        10 months ago

        Pshaw, real programmers write out the contents of .git by hand.

        (Also, it was a joke, the last two commands I listed are ones you’ll ideally never need in your life)

    • Valmond@lemmy.mindoki.com
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      reflog saved my life once after a stupid misshap.

      All rebase are belong to us (onto, rebase, and ofc interactive) but what’s fsck (I don’t squash personally)?

  • lseif@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    10 months ago

    using LazyGit in tmux has changed my workflow.

    instead of: git add . git commit -m 'foo' fg

    i just: g ac foo q

    and it displays everything neatly

    Edit: apparently greater/less than symbols dont render properly on lemmy. so imagine a few (CR)'s and (C-b)'s sprinkled in