• Community
  • Products
  • Sourcetree
  • Questions
  • how to avoid uncommited changes on files in repository (on a shared partition) that is managed by two different sourcetree installations (windows and OSX)?

how to avoid uncommited changes on files in repository (on a shared partition) that is managed by two different sourcetree installations (windows and OSX)?

I am running a windows partition on my MacBook Pro and have my repository on a third partition (formated with exFAT).

I want do develop on the same code (mostly Java and MaxMSP) in my repository when running either windows or OSX and want to use sourceTree to manage the repository. It works, but whenever I make a commit from one side (i.e. OSX-Sourcetree) and switch over to the other (i.e. Windows-Sourcetree), all files inside my repository are marked as uncommited changes even though the individual diff shows no changes at all.

Any clues why this happens and/or do you have suggestions how to solve this issue?

3 answers

It could be a line-ending issue - how do you have your line-endings configured on the Windows side?

you might be spot on, but so far I was unabe to fix it. I added a .gitattribute to the repository:

 

>

# Set the default behavior, in case people don't have core.autocrlf set.

* text eol=crlf

 

# Denote all files that are truly binary and should not be modified.

*.png binary

*.jpg binary

 No newline at end of file

 <

but this didnt help.

 

any suggestions on how to proceed?

 

The git EOL settings take effect when pushing and pulling, not just when checking your working copy for changes. You should check the EOL settings in your editing tools in both OSes.

I couldnt find a simple fix so I setup a new repository (losing the previous change history), but before that I made sure both sourcetree instances use its internal git (I think the issue started with a git install on windows with a change of the default EOL settings during the installation process). now it works without a problem.

thank you for pointing me into the right direction.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

828 views 3 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you