Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected] • 2 months ago

git workflow

lemmy.ml

message-square
39
fedilink
  • cross-posted to:
  • [email protected]
545

git workflow

lemmy.ml

@[email protected] to Programmer [email protected] • 2 months ago
message-square
39
fedilink
  • cross-posted to:
  • [email protected]
alert-triangle
You must log in or register to comment.
  • Scratch
    link
    fedilink
    English
    51•2 months ago

    Be a man.

    ‘git commit -am “changes”’

    • Drew Belloc
      link
      fedilink
      37•2 months ago

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

      • @[email protected]
        link
        fedilink
        24•2 months ago

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

        • Drew Belloc
          link
          fedilink
          12•2 months ago

        • magic_lobster_party
          link
          fedilink
          11•2 months ago

          && git push --force

      • Scratch
        link
        fedilink
        English
        33•2 months ago

        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.

        • @[email protected]
          link
          fedilink
          1•1 month ago

          That’s how you get a Boing

      • @[email protected]
        link
        fedilink
        English
        18•2 months ago

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

        • Drew Belloc
          link
          fedilink
          11•2 months ago

        • synae[he/him]
          link
          fedilink
          English
          5•
          edit-2
          1 month ago

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

        • ѕєχυαℓ ρσℓутσρє
          link
          fedilink
          7•
          edit-2
          2 months ago
          alias {gti,gut}='git commit -am "changes" && git push -f'
          
    • @[email protected]
      link
      fedilink
      5•1 month ago

      git yolo

    • @[email protected]
      link
      fedilink
      6•2 months ago

      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
      • @[email protected]
        link
        fedilink
        5•2 months ago

        I’ve got signing auto enabled though

    • @[email protected]
      link
      fedilink
      2•1 month ago

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

  • @[email protected]
    link
    fedilink
    13•2 months ago

    … What’s git merge look like?

    • @[email protected]
      link
      fedilink
      English
      18•2 months ago

      Tenerife incident.

      • @[email protected]
        link
        fedilink
        2•
        edit-2
        2 months ago

        … incident

  • @[email protected]
    link
    fedilink
    23•2 months ago

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

    • Dave
      link
      fedilink
      7•2 months ago

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

      • @[email protected]
        link
        fedilink
        English
        6•2 months ago

        Check out magit!

        • Dave
          link
          fedilink
          2•2 months ago

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

          Also, ew, emacs 😝

          • @[email protected]
            link
            fedilink
            English
            2•1 month ago

            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…

  • @[email protected]
    link
    fedilink
    10•2 months ago

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

    • Drew Belloc
      link
      fedilink
      7•2 months ago

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

      • @[email protected]
        link
        fedilink
        4•2 months ago

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

        • Drew Belloc
          link
          fedilink
          1•2 months ago

          Gonna try it out non my next college project

          • @[email protected]
            link
            fedilink
            2•
            edit-2
            2 months ago

            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
              link
              fedilink
              2•2 months ago

              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

              • @[email protected]
                link
                fedilink
                2•2 months ago

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

                • Drew Belloc
                  link
                  fedilink
                  1•2 months ago

                  Sure, thanks for the recomendation

  • synae[he/him]
    link
    fedilink
    English
    10•1 month ago

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

  • @[email protected]
    link
    fedilink
    5•1 month ago

    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.

  • @[email protected]
    link
    fedilink
    3•1 month ago

    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

  • @[email protected]
    link
    fedilink
    4•2 months ago

    Use Jujutsu jj and you won’t have this problem

  • Anti-Antidote
    link
    fedilink
    2•2 months ago

    Jujutsu time 😁

  • @[email protected]
    link
    fedilink
    4•1 month ago

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

  • Comtief
    link
    fedilink
    7•2 months ago

    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.

  • @[email protected]
    link
    fedilink
    3•2 months ago

    lazygit is pretty cool too.

Programmer [email protected]

[email protected]
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: [email protected]

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
  • 109 users / day
  • 352 users / week
  • 1.03K users / month
  • 3.82K users / 6 months
  • 3 subscribers
  • 1.45K Posts
  • 51.5K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @[email protected]
  • Pierre-Yves Lapersonne
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org