-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change description of rebase and cherry-pick #1
base: master
Are you sure you want to change the base?
Conversation
Both of them do copy, it's just that rebase also moves the branch head making the previous commits slightly less accessible. Also it's git cherry-pick with a hyphen.
Skip this commit if you only want the other changes since this one is a bit of a bigger change.
Here's how this started (in case this explanation makes this PR less creepy):
Take it or leave it, thanks for a great git resource, I had never heard of your web page before. |
I left the commits as separate rather than squashed in case you wanna skip some of them 🤷🏻♀️ |
Hi! Thanks so much for taking the time to leave me feedback. I actually keep the sources for this website in a private repo and only keep the generated result in this public one. So I have made most of the changes you suggested over there and updated the site. I am keeping the description of git rebase as it is for now, because I think for a mental model it is fine to think of the commits as being moved instead of copied insofar as you can't easily reach the before-rebase commits through normal beginner level git workflows (e.g. without using the reflog). And if/when cleared from the reflog, I believe they eventually get collected by the garbage collector. |
Reflog isn't beginner level…?!
There's another issue with the idea of moving the commits; copying makes
it less weird that the new hashes aren't the same. IDK, I just had a hard
time understanding git until I learned what was really going on. So when
people express mental models like this, beginners will go "whaddayamean
moved…?"
|
That's also a fair point. I'll keep thinking about it. Considering them as copied also seems confusing to me, as they aren't readily accessible with their pre-rebase history (as with e.g. cherry-pick). IDK, like I said, you've given me something to think about. |
Both of them do copy, it's just that rebase also moves the branch head
making the previous commits slightly less accessible. Also it's git
cherry-pick with a hyphen.