6 ms·
Yeah, please don't create sites like this. Just... don't. Any, and I mean any "in case of a Git problem, just do this" recipe is wrong, often in very subtle wa
by antithesis-nl 2y ago
Yeah, please don't create sites like this. Just... don't.
Any, and I mean any "in case of a Git problem, just do this" recipe is wrong, often in very subtle ways. So, my advice: in case of a Git problem, contact the help channel provided by the organization hosting your Git repository. They'll help you out! And if it's your personal-I-am-truly-the-only-human-using-this repository? Just recreate it, and save yourself the pain.
Source: I'm part of the team behind the #githelp channel in many $DAYJOBs, and we know how hard things are. You committed an unencrypted password file, or worse, your entire 'secret' MP4 collection to our monorepo? Sure, just let us know! Pushed your experimental branch to master/main/head/whatever? We'll fix it!
Just don't ever, for whatever reason, run that-chain-of-commands you found on the Internet, without understanding what they do! In most cases, your initial mistake can be undone pretty quickly (despite requiring nonstandard tooling), but once you're three levels deep and four days later, not so much...
- 1over137 2y agoWe’re not all working at $bigcorp with dedicated help teams. Sites like this are great and have helped me many times!
- doubled112 2y agoWhat happens when you are the help team and it's the first time something goes wrong?
- antithesis-nl 2y agoA 'team', by definition, consists of more people than 'you.' And, by the time a '#githelp team' is formed, it's to address patterns to which there are known solutions. One of the many problems with Git, is that these solutions depend very, very much on the structure of the repo and the common practices of its users. So, instead of executing random commands from the Internet, just ask. Please! Or, if there's truly nobody going to be around, give in and recreate the repo. You'll save yourself so much pain in the long run...
- recursive 2y ago> A 'team', by definition, consists of more people than 'you.' I'm the resident git expert, but not by choice. There's more that I don't know than that I do. It's not uncommon that I need to use internet recipes to un-wedge someone's clone. > Or, if there's truly nobody going to be around, give in and recreate the repo. You'll save yourself so much pain in the long run... This is insane. There are a dozen other people using the remote, not to mention a whole CI/CD build configuration.
- antithesis-nl 2y agoOK, so you've truly screwed up your your personal/small-team repos to the point of requiring poorly-understood command sequences from the Notoriously Reliable Internet more than once? I applaud you for your honesty, but... Really?
- jazzyjackson 2y agoBro, really, self-taught people with a bare minimum understanding of the tools they use are super normal, and when they get into a pit they have to fix it themselves. Although to your point folks would be better served carefully reading the docs / git book than googling a specific solution to their specific error code.
- antithesis-nl 2y ago[flagged]
- jazzyjackson 2y agoI guess we're coming from different places. In my vernacular, ending a comment with "...really?" is about as casual as calling somebody bro. It's gender neutral btw.
- leptons 2y ago"Bro" is the furthest thing from "gender neutral". Not sure how you could think it's gender neutral. It originated from male behavior and is definitely not gender neutral. You can address women as "bro" and they might even respond to you but they'll think you're absolutely weird.
- jazzyjackson 2y ago"bro", "bruh", it's more of an exclamation of surprise than a title conferred to the person being addressed, but even then, I don't know, people call folks "auntie" and "uncle" who aren't actually their auntie and uncle. language is flexible. it may reference the kind of fraternity between brothers but that feeling is not limited to the male sex.
- PaulDavisThe1st 2y agoI've been using git for at least 6 years now, maybe 10. Sites like this are a great aid to remembering how to deal with certain situations. And yes, I understand what the commands do, but that doesn't mean I always could, or always want to, put together the series of steps from scratch. And also, we self-host our own gitea hosting because we're not getting sucked down by yet another hosting debacle (old enough to have suffered under sourceforge, and don't plan on getting in the same situation again). For git hosting just as much as everything else on line, if you're not paying for it, you're not the customer.
- antithesis-nl 2y ago> For git hosting just as much as everything else on line, if you're not paying for it, you're not the customer. Yeah, lovely trope, but I'm literally talking about organizations hosting their Git repos on a file share here.
- PaulDavisThe1st 2y agoWhy would you ask employees of a file hosting service about how to use git?
- jpeloquin 2y agoRecipes like these aren't useless, but yes, they really need to be prefixed with whether they expect to start from a clean work tree and empty staging area. Or describe what they'll do to uncommitted changes, both staged & unstaged. Otherwise they pose a substantial risk of making the problem worse.
- conkeisterdoor 2y ago> "... or worse, your entire 'secret' MP4 collection to our monorepo?" Oh no, that poor soul...