D•Scribe
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 3 个月前

git workflow

lemmy.ml

message-square
39
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
557

git workflow

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 3 个月前
message-square
39
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
alert-triangle
You must log in or register to comment.
  • Scratch@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    53
    ·
    3 个月前

    Be a man.

    ‘git commit -am “changes”’

    • Drew Belloc@programming.dev
      link
      fedilink
      arrow-up
      38
      ·
      3 个月前

      At this point just create a script or alias called “fuckthis” that does that and then push direct to main

      • Scratch@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        35
        ·
        3 个月前

        PR reviews take the most time, eliminating those saved us loads of time.

        QA were also bogging us down, axed them too. Now we’re flying.

        The Social Security Infrastructure rebuild should be done in a matter of weeks! At least that’s what Copilot says.

        • Vittelius@feddit.org
          link
          fedilink
          arrow-up
          1
          ·
          3 个月前

          That’s how you get a Boing

      • jol@discuss.tchncs.de
        link
        fedilink
        arrow-up
        26
        ·
        3 个月前

        I have auto save on. A cron job running every minute with just git add . && git commit - m “wip”

        • Drew Belloc@programming.dev
          link
          fedilink
          arrow-up
          13
          ·
          3 个月前

        • magic_lobster_party@fedia.io
          link
          fedilink
          arrow-up
          12
          ·
          3 个月前

          && git push --force

      • DannyBoy@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        19
        ·
        3 个月前

        Have the name of the alias be “gti” or “gut”

        • Drew Belloc@programming.dev
          link
          fedilink
          arrow-up
          11
          ·
          3 个月前

        • ѕєχυαℓ ρσℓутσρє@lemmy.sdf.org
          link
          fedilink
          arrow-up
          7
          ·
          edit-2
          3 个月前
          alias {gti,gut}='git commit -am "changes" && git push -f'
          
        • synae[he/him]@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          5
          ·
          edit-2
          3 个月前

          I have about a dozen aliases of various mistypings of “git”. Somehow I still hit unaliased typo once in a while

    • KindaABigDyl@programming.dev
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      3 个月前

      And any project worth their salt will reject it for two reasons:

      1. Unclear message/changes (potentially too many changes at once)
      2. Not signed
      • wise_pancake@lemmy.ca
        link
        fedilink
        arrow-up
        5
        ·
        3 个月前

        I’ve got signing auto enabled though

    • Birch@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      3 个月前

      git yolo

    • JiminaMann@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      3 个月前

      Doesn’t work for me idk why, it’ll ignore the message, and i have to commit again before i can push

  • Limonene@lemmy.world
    link
    fedilink
    arrow-up
    24
    ·
    3 个月前

    I like git add because then you can do git diff --staged

    • Dave@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      3 个月前

      Yes yes, combined with git add -P makes small, meaningful commits so much easier.

      • fossphi@lemm.ee
        link
        fedilink
        English
        arrow-up
        6
        ·
        3 个月前

        Check out magit!

        • Dave@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          3 个月前

          Alas I sold my soul to VSCode a long time ago.

          Also, ew, emacs 😝

          • fossphi@lemm.ee
            link
            fedilink
            English
            arrow-up
            2
            ·
            3 个月前

            Oh come on, try it out! I know some people who use emacs only for magit. It really is that good.

            A few of them slowly became full on emacs users…

  • zero_spelled_with_an_ecks@programming.dev
    link
    fedilink
    arrow-up
    13
    ·
    3 个月前

    … What’s git merge look like?

    • zqwzzle@lemmy.ca
      link
      fedilink
      English
      arrow-up
      18
      ·
      3 个月前

      Tenerife incident.

      • childOfMagenta@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        3 个月前

        … incident

  • synae[he/him]@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    10
    ·
    3 个月前

    grow up, use “git add -p” and craft perfect artisanal commits

  • heavydust@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    3 个月前

    Real 10x vibe developers use https://jj-vcs.github.io/jj/latest/, no need to add or commit!

    • Drew Belloc@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      3 个月前

      So is easier to push direct to prod? Hell yeah!

      • heavydust@sh.itjust.works
        link
        fedilink
        arrow-up
        4
        ·
        3 个月前

        With jj you’re always the prod whatever you do! Feel free to break that fucking CI.

        • Drew Belloc@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          3 个月前

          Gonna try it out non my next college project

          • heavydust@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            3 个月前

            You may or may not be joking, but jujutsu is the first true git alternative that I’m actively trying on small projects at work. The command-line is great, and I can still interact with other devs without breaking stuff.

            Buuuuuuuut if you’re a CS student, don’t bother, it’s weird and you should focus on git which is used everywhere. You can get free GUI clients like Sublime Merge or SmartGit to ease the pain. I’ve been hating git since the beginning, but it’s the least worst SCM right now. Learn the command-line, but I have never done that since it’s infuriating, and that’s why I’ve been using GUIs since, holy shit, Wikipedia says 2005.

            • Drew Belloc@programming.dev
              link
              fedilink
              arrow-up
              2
              ·
              3 个月前

              Is just half a joke, i do like to try it out a lot of different things, be whatever it may be, so i’m totally finding a project to use this, and also i don’t really like to use a GUI for git simce most of my workflow happens in a terminal, and even tho i do like how git works i am open to try something new and see if it’s better for me or not

              • heavydust@sh.itjust.works
                link
                fedilink
                arrow-up
                2
                ·
                3 个月前

                Try Mercurial too. Both projects started at the same time but git won. Mercurial is equivalent but its interesting.

                • Drew Belloc@programming.dev
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  3 个月前

                  Sure, thanks for the recomendation

  • Comtief@lemm.ee
    link
    fedilink
    arrow-up
    7
    ·
    3 个月前

    i’m sure there are much better tools available, but i’m just used to git gui where rescan, commit and push all are in order.

  • NigelFrobisher@aussie.zone
    link
    fedilink
    arrow-up
    5
    ·
    3 个月前

    Every bloody time, though this case the people not on the Ryanair flight may be the lucky ones. If only git was the most unnecessarily arcane thing devs have to/choose to work with.

  • tatterdemalion@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    3 个月前

    Use Jujutsu jj and you won’t have this problem

  • lobut@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    3 个月前

    lazygit is pretty cool too.

  • callmepk@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    3 个月前

    I specifically have a oh-shit alias for this kind of stuff lol: https://code.wedotstud.io/patrick/dotfiles/src/commit/c2f93629fe27d1747ceb22b4d6442840d109aa99/.gitconfig#L28

  • thirteene@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    3 个月前

    I set this up for seamless commits:

    function gao() {
         git add .
         git commit -a -m "$*"
         git push origin `git rev-parse --abbrev-ref HEAD`
     }
    

    Usage: gao fixing a typo

  • Anti-Antidote@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    3 个月前

    Jujutsu time 😁

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 306 users / day
  • 3.75K users / week
  • 8.91K users / month
  • 19.9K users / 6 months
  • 10 local subscribers
  • 24.7K subscribers
  • 1.42K Posts
  • 45.7K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: unknown version
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org