kuuhana
  • Communities
  • Multi-communities
  • Support Lemmy
  • Search
  • Login
  • Sign Up
Programmer Humor@programming.devbyPhoenix3875@lemmy.world
3 years

One command to rule them all

lemmy.world English
24
    You must log in or register to comment.

    • mvirts@lemmy.worldEnglish
      3 years

      mv .git .git_old7

      git init

      git add .

      git commit -m “almost working”

        • minorsecond@lemm.eeEnglish
          3 years

          Lmao this is perfect

        • Ocelot@lemmies.world
          3 years

          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
              3 years

              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.worldEnglish
              3 years

              Neither remove untracked files sadly.

                • sickday@kbin.social
                  3 years

                  git stash my friend

                    • BlueBockser@programming.dev
                      3 years

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

                        • HairHeel@programming.dev
                          3 years

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

                            • BlueBockser@programming.dev
                              3 years

                              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
                              3 years

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

                                • Ocelot@lemmies.world
                                  3 years

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

                                    • PoastRotato@lemmy.world
                                      3 years

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

                              • slampisko@czech-lemmy.eu
                                3 years

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

                              • Sonotsugipaa@lemmy.dbzer0.comEnglish
                                3 years

                                git restore . ?
                                Or am I misinterpreting the problem?

                                  • static_motion@programming.devEnglish
                                    3 years

                                    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
                                        3 years

                                        Yep, I just learned of this command…

                                    • girltwink@lemmy.worldEnglish
                                      3 years

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

                                        • zexu@lemmy.worldEnglish
                                          3 years

                                          😂😂😂

                                        • Synthead@lemmy.worldEnglish
                                          3 years

                                          And lose my untracked changes?

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

                                          • Martin@feddit.nu
                                            3 years

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

                                            • niyrme@lemmy.world
                                              3 years

                                              git stash

                                              Programmer Humor@programming.dev

                                              programmer_humor@programming.dev

                                              Subscribe from remote instance

                                              Create post

                                              Report community

                                              Modlog
                                              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

                                              This community is visible to everyone.

                                              • 431 users / Day
                                              • 572 users / Week
                                              • 586 users / Month
                                              • 14.5K users / 6 months
                                              • 2.33K posts
                                              • 89.9K comments
                                              • 2 local subscribers
                                              • 31.9K subscribers
                                              • UI: 1.0.0-beta.0
                                              • BE: 1.0.0-alpha.20
                                              • Modlog
                                              • Instances
                                              • Docs
                                              • Code
                                              • join-lemmy.org