Skip to content
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

A Deeper Look at Git: Expanded upon when it would be appropriate to use git reset #25743

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

roy9495
Copy link
Contributor

@roy9495 roy9495 commented Jul 3, 2023

Because

  • For git reset --soft, the index was left alone with examples.
  • There was no documentation regarding git reset --mixed
  • No index documentation for git reset --hard mentioned

This PR

In the A Deeper Look at Git lesson
-> Added the index documentation for git reset --soft with examples.
-> Added the index documentation for git reset --mixed with examples.
-> Added the index documentation for git reset --hard with examples.

Issue

Closes #25330

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly

@github-actions github-actions bot added the Content: Git Involves Git content label Jul 3, 2023
@KevinMulhern KevinMulhern self-assigned this Jul 11, 2023
Copy link
Member

@KevinMulhern KevinMulhern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay @roy9495.

I think we might be going into too much detail with this. This lesson is set up so users can follow along and this is a sizeable excursion from that. It may break the flow of the lesson.

We're also covering --mixed and --hard but learners won't have covered that in the previous content.

Going back to original issue:

I'm just not seeing why we care / what are the benefits of leaving the index alone on a reset.

This is the problem we need to solve, we can ignore --mixed and --hard and focus on giving a short explanation of why --soft is useful.

Maybe something like:

"You can think of git reset --soft as a more powerful amend. Instead of changing the last commit, you can go back multiple commits and combine all the changes included in them into one commit."

@roy9495
Copy link
Contributor Author

roy9495 commented Aug 26, 2023

Absolutely, I completely agree that bringing up --mixed and --hard could interrupt the flow of the lesson. Therefore, I'll focus solely on introducing git reset --soft.

Regarding your suggestion, in the initial problem, I believe he intended for the index to be highlighted alongside git reset --soft. As a result, I incorporated examples using branch names to address this.

@KevinMulhern
Copy link
Member

Sorry I keep dropping the ball with this @roy9495 😓

I don't think we need an example for this. We haven't had any more activity on the issue and this lesson is a follow along so any examples that don't conform to the overall example will be confusing. A little bit of explaining text should be enough.

To get this over the line, can this just be added to the bottom of the git reset --soft paragraph please?

"You can think of git reset --soft as a more powerful amend. Instead of changing the last commit, you can go back multiple commits and combine all the changes included in them into one commit."

@roy9495 roy9495 force-pushed the issue#25330/roy9495 branch from ad9a6c8 to d46e8ab Compare October 8, 2023 10:41
Copy link
Member

@KevinMulhern KevinMulhern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @roy9495 💪

@KevinMulhern KevinMulhern merged commit 4e7ac17 into TheOdinProject:main Oct 18, 2023
@roy9495
Copy link
Contributor Author

roy9495 commented Oct 19, 2023

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Git Involves Git content
Projects
None yet
2 participants