I have created a PR in Stash. I have made to changes to an existing file in the repository and I am want to view the changes in a file after creating a PR.
Stash shows the diff as if I have removed all the contents of the file and added it newly, while I have added only few lines of code in the existing file.
But when I select “Ignore whitespace” from the menu, I am able to view the changes I made.
Since the code is owned by the organization I will not be able to post the screenshot of it.
Has anyone faced this issue. I would really appreciate if anyone could help me fix it. Thanks for your help in advance.
Welcome to the Atlassian Community.
What you see is very common with diff tools, I have seen this multiple times before. It is usually caused by the editor and the type of line endings that it adds. The only way around it is to use the ignore white space and you could also create a post hook that runs a script that converts all line endings to either Windows style or Unix style. Git also allows you to set what style should be used when a file is committed, check out Git Configuration and the Formatting and Whitespace section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.