Civilloquy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemdro.id to Programmer Humor@programming.devEnglish · 3 days ago

When you screw up git

lemmy.zip

message-square
22
fedilink
644

When you screw up git

lemmy.zip

cm0002@lemdro.id to Programmer Humor@programming.devEnglish · 3 days ago
message-square
22
fedilink
alert-triangle
You must log in or register to comment.
  • invertedspear@lemmy.zip
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 day ago

    My best friend when I fuck a commit up: https://ohshitgit.com/

    • luciferofastora@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      8 hours ago

      I didn’t know about the “revert single file” trick either. The rest is a handy reference too, thanks for sharing!

  • SkunkWorkz@lemmy.world
    link
    fedilink
    arrow-up
    28
    ·
    3 days ago

    “Proper way to commit after merge conflict” sounds like a robot trying to save a relationship after a bad sex experience

  • magic_lobster_party@fedia.io
    link
    fedilink
    arrow-up
    9
    ·
    3 days ago

    Keep your commits small. Merge often. That will reduce the likelihood of terrible merge conflicts.

    If you’re not sharing your work with your team mates for a long time, then you’re setting yourself up for trouble.

    • SpaceCowboy@lemmy.ca
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      3 days ago

      Also rebase is usually better than merge.

  • kubica@fedia.io
    link
    fedilink
    arrow-up
    15
    ·
    3 days ago

    git out --never-come-back

    • errer@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      3 days ago

      git never --gonna-give-you-up

      • gravitas_deficiency@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        git never --gonna-let-you-down

  • schnurrito@discuss.tchncs.de
    link
    fedilink
    arrow-up
    7
    ·
    3 days ago

    I remember when similar screenshots circulated for how to tell if i am running jdk or jre, which is even more surprising.

  • dream_weasel@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    3 days ago

    No merges allowed. Rebase only.

    • dream_weasel@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      And if you can’t figure out how to rebase, I definitely don’t want you solving your own merge commit!

  • Anafabula@discuss.tchncs.de
    link
    fedilink
    arrow-up
    9
    ·
    3 days ago

    Jujutsu (which is compatible with git) has a nice conflict resolution flow that doesn’t break you workflow.

    Conflicts are encoded into the commits, so that there is never a weird in between state that you have to deal with immediately before being able to do anything else.
    Then you can use Jujutsu’s easier history manipulation to resolve the conflict in the conflicted commits.

    https://steveklabnik.github.io/jujutsu-tutorial/branching-merging-and-conflicts/conflicts.html

    And you could always jj undo if you did something you didn’t want to.

  • Echo Dot@feddit.uk
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    3 days ago

    See I wasn’t really going to kill myself today, but the thought of dialing that long ass number is just to much.

  • aliser@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    3 days ago

    git is like a minefield. stray away even a little bit from standard path and you are done for. I had git multiple times throw some obscure errors at me when trying some commands and then trying to undo/recover. how’s “undo” is not a git command I don’t understand.

    • nialv7@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      undo is a jj command ;)

  • GreenKnight23@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    3 days ago

    in life you commit to many things. you commit to yourself, to your partner, to happiness, to legacy.

    when we die, is that like a push to origin?

    when we die, do our commits all go to the big repo in the sky?

    is god the maintainer? when you pray is that like a bug report?

    so many questions…

  • dubyakay@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    3 days ago

    Google gives you results based on your prior search history.

  • Antagnostic@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    3 days ago

    If you git help, you could hash things out, rebase your commitments, and push forward to a better life. Then again I could just be cherry picking things.

  • mavu@discuss.tchncs.de
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    3 days ago

    I don’t get why people have such problems with this they even make memes about it.

    Have you people never merged anything by hand or what? It’s really not hard.

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    2
    ·
    3 days ago

    Commit branch…I see your thinking of hanging yourself, here is a link to tying a noose

  • JasonDJ@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    man \ git

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.

  • 572 users / day
  • 4.51K users / week
  • 7.03K users / month
  • 15.3K users / 6 months
  • 1 local subscriber
  • 26.8K subscribers
  • 1.59K Posts
  • 39.9K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org