Earlier quoted context omitted.
Possibly consider that "deleting a file from history" is rather far outside the norm or recommended practice for git (even though it is, of course, entirely possible)
> even though it is, of course, entirely possible I take the more realistic perspective: until git makes it impossible to commit something that shouldn't have been, like a secret, then deleting a file from history is a fundamental requirement of git.
Oh Shit, Git?
21–30 of 275 posts
Re: Oh Shit, Git?
#22Git is one of those technologies that I never got to wrap my head around of, because in so many ways it doesn't follow intuition and unless you have been using it for a long time, for literally every action you would probably have to Google or use the man page of the command.
Re: Oh Shit, Git?
#23Earlier quoted context omitted.
Bro, 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.
[flagged]
It's gender neutral btw.
Re: Oh Shit, Git?
#24Git is one of those technologies that I never got to wrap my head around of, because in so many ways it doesn't follow intuition and unless you have been using it for a long time, for literally every action you would probably have to Google or use the man page of the command.
It's ok mate. Hackernews says we should be using jj to manage our rewritten-in-Rust code.
Re: Oh Shit, Git?
#25Earlier quoted context omitted.
I'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 hav…
> 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.
Re: Oh Shit, Git?
#26Yeah, 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 yoursel…
Re: Oh Shit, Git?
#27Re: Oh Shit, Git?
#28Git is one of those technologies that I never got to wrap my head around of, because in so many ways it doesn't follow intuition and unless you have been using it for a long time, for literally every action you would probably have to Google or use the man page of the command.
It's ok mate. Hackernews says we should be using jj to manage our rewritten-in-Rust code.
Re: Oh Shit, Git?
#29Some changes I would make: 1. Always use `git switch` instead of `git checkout` 2. Avoid `reset --hard` at all costs. So for the "accidentally committed something to master that should have been on a brand new branch" issue, I would do this instead: # create a new branch from the current state of master git branch some-new-branch-name # switch to the previous commit git switch -d HEAD~ # overwrite master branch to th…
# this command exists already;
$ git switch -c some-new-branch-name
# is there a command that simply moves a branch from one commit to another without changing anything else? It feels like it should be possible given how git works.
$ git move-branch master HEAD~Re: Oh Shit, Git?
#30Earlier quoted context omitted.
[flagged]
I 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.