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

Change to git add renormalize command after changing line endings #35841

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

mems
Copy link
Contributor

@mems mems commented Jan 6, 2025

Why:

I follow the instructions of "Refreshing a repository after changing line endings", but after normalize all files in a repo, some files still unnormalized (when I switch branches or merge, these "fantom-changes-that-can't-be-undo" appears).
After few search on the web, I found the mentioned command (git rm -rf --cached . ; git reset --hard HEAD) aren't recommended in git doc, but git add --renormalize . is since git 2.16 ("a new and safer way to record the fact that you are correcting the end-of-line convention").
Before it was use different command combinations:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Change the snippet to use the command that normalize all files

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require a SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing.

Copy link

welcome bot commented Jan 6, 2025

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jan 6, 2025
@nguyenalex836 nguyenalex836 added content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review get started Content related to "Getting Started" doc set and removed triage Do not begin working on this issue until triaged by the team labels Jan 6, 2025
@nguyenalex836
Copy link
Contributor

@mems Thanks so much for opening a PR! I'll get this triaged for review ✨

@nguyenalex836 nguyenalex836 added the needs SME This proposal needs review from a subject matter expert label Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀

@nguyenalex836 nguyenalex836 added SME reviewed An SME has reviewed this issue/PR and removed waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert labels Jan 9, 2025
@nguyenalex836
Copy link
Contributor

@mems Thanks so much for opening a PR with this fix! I'll update the branch and get this merged once tests are passing 🍏

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
get-started/getting-started-with-git/configuring-git-to-handle-line-endings.md fpt
ghec
ghes@ 3.15 3.14 3.13 3.12 3.11 3.10
fpt
ghec
ghes@ 3.15 3.14 3.13 3.12 3.11 3.10

fpt: Free, Pro, Team
ghec: GitHub Enterprise Cloud
ghes: GitHub Enterprise Server

@nguyenalex836 nguyenalex836 added this pull request to the merge queue Jan 9, 2025
Merged via the queue into github:main with commit f8b20d1 Jan 9, 2025
45 checks passed
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team get started Content related to "Getting Started" doc set SME reviewed An SME has reviewed this issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants