I have created a new repository in BitBucket Server, and it is populated and in use. However, several of our users (myself included) are having a problem where unexpected changes are appearing on checkout. It does not appear on every checkout, only sporadically.
The changes appear to be a complete rewrite of the file(s) in question. git diff does not show, for example, that all line endings have changed. We are also using SVN Mirror to bring in changes from our older subversion repository on trunk -> master. Everyone is using 2.14 version of git on Windows.
The following commands will fix it temporarily, but it inevitably comes back
git rm --cache -r git reset --hard Example:
MINGW64 /c/code/git/repo (master) $ git status On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working tree clean MINGW64 /c/code/git/repo (master) $ git checkout - Switched to branch 'dev/test_branch' MINGW64 /c/code/git/repo (dev/test_branch) $ git status On branch dev/test_branch nothing to commit, working tree clean MINGW64 /c/code/git/repo (dev/test_branch) $ git checkout - Switched to branch 'master' Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) MINGW64 /c/code/git/repo (master) $ git status On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: <snip-filename>.java modified: <snip-filename2>.java ... etc ... modified: <snip-lastfilename>.java no changes added to commit (use "git add" and/or "git commit -a") Edit: Checking git diff -w to exclude whitespace changes shows no differences, so it definitely appears to be eol related.