TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
9.08k stars 12.57k forks source link

Intermediate Git: Change HEAD^ to HEAD~ #28273

Closed SumonGFC closed 3 days ago

SumonGFC commented 6 days ago

Checks

Describe your suggestion

In A Deeper Look at Git, we can see that in this section we are instructed to use HEAD^ to refer symbolically to the parent of HEAD, but everywhere else in the lesson (like here and here) we use HEAD~(n) to refer to parent(s) of HEAD. Although functionally the same within the context of this lesson, the distinction between these selectors is not explained which can lead to some potential confusion. I think the simplest fix for this (if one is necessary) would be to replace the HEAD^ in the "Splitting up a commit" section with just HEAD~ and omit any mention of the caret selector. Otherwise, an additional resource like this SO post does a good job of explaining the distinction, if a little advanced.

If this is a valid issue, then it might be good first issue for someone to handle the PR.

Path

Ruby / Rails, Node / JS

Lesson Url

https://www.theodinproject.com/lessons/ruby-a-deeper-look-at-git

(Optional) Discord Name

Chindiana Jones

(Optional) Additional Comments

No response

CouchofTomato commented 5 days ago

Do you think it's worth adding the link as an additional resource maybe?

I agree with the other proposed change and happy to open this up since you don't want to work on it

SumonGFC commented 5 days ago

@CouchofTomato Thank you. Please open it up for someone to handle (I think it would be a good first issue for someone to submit their first PR for).

If the HEAD^ is changed to HEAD~, then I actually don't think it is worth adding the SO post as an additional resource since the lesson would then make no mention of HEAD^. If the HEAD^ is left unchanged, then I do think the SO post as an additional resource would be necessary. I am in favour of the former solution (changing ^ to ~) as I think it is the most simple.

mathdebate09 commented 4 days ago

Hey I'd love to work this issue up. Also, i agree with the simpler approach of just changing HEAD^ to HEAD~ & the additional resource turns out to to be redundant if there's no mention, and it looks like something that could be easily found by searching around SO

SumonGFC commented 3 days ago

@CouchofTomato please feel free to assign @mathdebate09 to this issue.