0

We are using BitBucket as part of our Continuous Integration (CI) set up.

As part of it, we are cloning source code to server machine (windows OS) using Jenkins GIT Plugin.

While cloning repository to server machine, we noticed files with extension ".config" are modified surprisingly.

When we compared files, we found character '0D' (Hex) replaced with ' ' (Hex) character.

Could anyone guide why such behaviour happening with git clone with Bitbucket ?

Also thing to note is that, when we are cloning Bitbucket repository on different machine/system with windows OS, files are getting downloaded without modification i.e. cloned file and file present on Bitbucket server are identical.

So my question is -

1.What steps should i follow to overcome this issue? Can you please guide.

2.Why git clone work differently even though underlying OS is same i.e.Windows.

Regards,

Sandeep

  • Does this answer your question? [Files showing as modified directly after a Git clone](https://stackoverflow.com/questions/5009096/files-showing-as-modified-directly-after-a-git-clone) – phd Apr 07 '20 at 10:16
  • https://stackoverflow.com/search?q=%5Bgit%5D+clone+modified – phd Apr 07 '20 at 10:16

1 Answers1

0

It's due to how line endings are represented in text files on different operating systems.

Windows uses both Carriage Return (0x0D) and Line Feed (0x0A) while other operating systems only use Line Feed.

The default settings for most Source Control programs is to do these translations for you.

Powerlord
  • 87,612
  • 17
  • 125
  • 175