Can Git change files on checkout?

Does Git ever change files on checkout? I’m experiencing behavior where I check out a branch, and without touching anything I suddenly have six or eight changed files.

These files are marked as “not staged for commit” and they are not files that I had already edited on an existing branch.

  • Automated sync between Github and Kiln
  • Using git flow with git subtree
  • find location of git.exe
  • .git/info/exclude replacement for git submodule?
  • GitLab SSL handshake error when performing a Git Pull/Clone Using TortoiseGit and Ansible
  • How do I untrack CVS folders after using git-cvsimport?
  • I suspect it’s connected to a “line endings” setting discrepancy but I haven’t been able to isolate it. Here are all the Git settings (except for stuff like user.name and things like that):

    core.symlinks=false
    core.autocrlf=true
    color.diff=auto
    color.status=auto
    color.branch=auto
    color.interactive=true
    pack.packsizelimit=2g
    help.format=html
    sendemail.smtpserver=/bin/msmtp.exe
    diff.astextplain.textconv=astextplain
    rebase.autosquash=true
    core.autocrlf=true
    core.excludesfile=C:\Users\username\Documents\gitignore_global.txt
    merge.renormalize=true
    core.repositoryformatversion=0
    core.filemode=false
    core.bare=false
    core.logallrefupdates=true
    core.symlinks=false
    core.ignorecase=true
    core.hidedotfiles=dotGitOnly
    

    Any help would be appreciated.

  • How do I fix incorrect pushed commit in Git?
  • Why is it necessary to lose untracked files when you set up github pages?
  • Git - merge from specific commit onwards
  • jenkins remoting callable on slave using groovy
  • Can I have a workspace that is both a git workspace and a svn workspace?
  • How to make a git command read settings from .gitconfig file?
  • One Solution collect form web for “Can Git change files on checkout?”

    Try running git diff -b (diff ignoring whitespace changes). If the diff comes back empty then it’s probably all due to the line-ending conversions like you suspect.

    Git Baby is a git and github fan, let's start git clone.