schlunker
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Phoenix3875@lemmy.world to Programmer Humor@programming.devEnglish · 2年前

One command to rule them all

lemmy.world

message-square
21
fedilink
231

One command to rule them all

lemmy.world

Phoenix3875@lemmy.world to Programmer Humor@programming.devEnglish · 2年前
message-square
21
fedilink
alert-triangle
You must log in or register to comment.
  • mvirts@lemmy.world
    link
    fedilink
    English
    arrow-up
    52
    ·
    edit-2
    2年前

    mv .git .git_old7

    git init

    git add .

    git commit -m “almost working”

    • minorsecond@lemm.ee
      link
      fedilink
      English
      arrow-up
      5
      ·
      2年前

      Lmao this is perfect

  • Ocelot@lemmies.world
    link
    fedilink
    arrow-up
    50
    arrow-down
    2
    ·
    edit-2
    2年前

    fuck it. rm -rf repository; git clone repository

    Been using git since almost as long as its been around, still can’t be bothered to learn to how to fix conflicts.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      17
      ·
      2年前

      Rename it, so you can run diff on those surprising things that in no way could have changed, but are not equal to the repository. And then delete.

      Or keep the X-old; X-backup; X-bkp; X-old-old; X-old3 dirs.

  • joyjoy@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    ·
    2年前

    Neither remove untracked files sadly.

    • sickday@kbin.social
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      2年前

      git stash my friend

      • BlueBockser@programming.dev
        link
        fedilink
        arrow-up
        17
        arrow-down
        1
        ·
        2年前

        I think git clean is more appropriate. With git stash you create a stash which you then have to drop.

        • HairHeel@programming.dev
          link
          fedilink
          arrow-up
          37
          ·
          2年前

          Who says you have to drop it? I’ve got stuff from 2007 in there somewhere.

          • BlueBockser@programming.dev
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            2年前

            Of course you don’t have to, but if you don’t plan on ever using it then it’s just trash living in your git folder. If you do plan on using it again in the future, then it’s usually better to make it a branch so you can push it to a remote.

        • sickday@kbin.social
          link
          fedilink
          arrow-up
          9
          ·
          2年前

          Yea but you can always git pop if you need any of your stashed changes

          • Ocelot@lemmies.world
            link
            fedilink
            arrow-up
            8
            ·
            2年前

            i chuckled at the thought of ‘git poop’ being a command. I’m going to alias that to something.

            • PoastRotato@lemmy.world
              link
              fedilink
              arrow-up
              9
              ·
              edit-2
              2年前

              You could make it run git pop until it clears the whole stash

    • slampisko@czech-lemmy.eu
      link
      fedilink
      arrow-up
      1
      ·
      2年前

      That’s why I follow it with git clean -fd

  • Sonotsugipaa@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    1
    ·
    2年前

    git restore . ?
    Or am I misinterpreting the problem?

    • static_motion@programming.dev
      link
      fedilink
      English
      arrow-up
      18
      ·
      2年前

      git restore is a pretty new command AFAIK. Those of us who learned git before its existence have probably stuck to the old ways of git reset --hard.

      • TheSealStartedIt@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        2年前

        Yep, I just learned of this command…

  • girltwink@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    2年前

    alias mybad=‘git add -u && git commit --amend --no-edit && git push --force-with-lease’

    • zexu@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      2年前

      😂😂😂

  • Synthead@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    2年前

    And lose my untracked changes?

    https://m.youtube.com/watch?v=guv5LUT1AFw&t=7s

  • niyrme@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2年前

    git stash

  • Martin@feddit.nu
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    2年前

    That is stupid. Those commands are for different use cases.

  • vegai@suppo.fi
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2年前

    deleted by creator

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.

  • 1.13K users / day
  • 4.49K users / week
  • 8.67K users / month
  • 19.9K users / 6 months
  • 1 local subscriber
  • 26.4K subscribers
  • 1.75K Posts
  • 65.1K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org