Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4015772
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:39:34+00:00 2026-05-20T09:39:34+00:00

I have a Windows based PHP project (CRLF Newlines) that wasn’t in any kind

  • 0

I have a Windows based PHP project (CRLF Newlines) that wasn’t in any kind of version control. I’ve recently put that project into Git on my OSX machine. Another developer made changes to the source (on a separate machine) while it wasn’t in Git and now I have to merge those changes into the repo.

My original plan was to use diff/patch to get everything synced up. Problem with this is that he made his updates on OSX so I have to convert the newlines in order to make diff/patch work.

Is there a way to make diff work with the CRLF newlines? From what I’ve read you have to do the conversion first to LF before applying diff.

If not, do I just have to recursively go through all the files and do the newline conversion?

Am I even going about updating this repo in the appropriate way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:39:35+00:00Added an answer on May 20, 2026 at 9:39 am

    When creating the patch, you should be able to tell the tool you use to ignore EOL changes or whitespace changes. Additionally git apply and git am have some options regarding how they handle whitespace but I have not used them so I’m unsure of how they handle diffs with extra whitespace and EOL changes.

    IMHO the real solution though is to correct all the CRLFs in your repo to LFs because git works best if everything uses LF line endings in the repo. If needed there are options to have the line endings changed to CRLF on checkout while still using LF internally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows.Forms based .NET desktop application that stores privileged information in a
I have a Deplhi based Windows Service that, on installation, parses some command line
I have a client server based windows forms application that needs an administrator only
Scenario I have a windows service written in C# that performs some processing based
I have a php application ( http://github.com/tchalvak/ninjawars ), essentially a php-based webgame that I
Heres my problem, I'm web developer and I have a web based script(PHP/CURL/HTML/JS) that
at work we have a web-based PHP-application which acts as the single UI that
I have created some PHP-based intranet resources that require users to log in. The
I have been developing our php based site on a development box that was
I have a site based on php/mySQL where publishers had inserted a lot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.