We fetch the discrepencies of our salesforce org and our bitbucket repository and add commits with differences for each component type:
Steps for automated script:
- Create a new branch and checkout to that branch.
- Fetch salesforce components (by type) for ex: retrieve all the apex classes using ant that are in repo and created a commit with differences.
But all the commits show a warning for many files: LF will be replaced by CRLF in src/classes/class_name.cls
Hence, unmodified or unchanged files are also added in the commits due to mismatch in line endings i.e. CRLF & LF or rn and n.
I tried repeating this process using all the configurations and combinations:
# First try
git config core.autocrlf true
# Second try
git config core.autocrlf false
# Third try
git config core.autocrlf input
Also Tried
## .gitattributes
eol=lf
text=auto
But results are the same, PS: I am using a windows machine.
How to remove these unmodified files?
I dont want to use –ignore-whitespaces as it will also exclude space differences elsewhere in the file not just eol.
2