# Git detects changes after new branch created and switched even though files have not been changed

2 messages from 2014-08-06 to 2014-08-06. Participants: Jared Brank, Jakub Narębski.
Thread: https://gitlist.dev/t/37298

## Jared Brank, 2014-08-06 15:04

Subject: Git detects changes after new branch created and switched even though files have not been changed
Message-ID: <a2546f9109674431820b7a98f9570433@BL2PR05MB180.namprd05.prod.outlook.com>
URL: https://gitlist.dev/e/a2546f9109674431820b7a98f9570433%40BL2PR05MB180.namprd05.prod.outlook.com

```
Running on Windows with latest version of Git. 1.9.4. Also had this trouble with 1.8.2 but upgraded hoping it would fix the problem.

When I do a reset on several files, it says they were successfully reverted they still show up as modified when I do a git status. In this case it's just a newline character at the end of the file. I also tried a reset -- hard and they files still show up! What the heck! Help please.
In trying to reproduce this, I re-cloned the git repo from the server, which was in the exact clean state before I started last time. No files have been modified after cloning, all are identical. Then, I created a new branch (totally new, not tracking a remote branch). Viola - I now have these files show up in my git status as modified. Please note that these are files that have been tracked for several previous commits.
Just to clarify - the only command I ran to make this happen is: git checkout -b newbranch

And GitGui shows the files as identical even when compare whitespace is turned on.

```

## Jakub Narębski, 2014-08-06 16:02

Subject: Re: Git detects changes after new branch created and switched even though files have not been changed
Message-ID: <53E2517E.8020301@gmail.com>
URL: https://gitlist.dev/e/53E2517E.8020301%40gmail.com
In-Reply-To: <a2546f9109674431820b7a98f9570433@BL2PR05MB180.namprd05.prod.outlook.com>

```
W dniu 2014-08-06 17:04, Jared Brank pisze:
> Running on Windows with latest version of Git. 1.9.4. Also had this
> trouble with 1.8.2 but upgraded hoping it would fix the problem.
>
> When I do a reset on several files, it says they were successfully
> reverted they still show up as modified when I do a git status. In
> this case it's just a newline character at the end of the file.

The problem might be the options (gitconfig and gitattributes)
affecting how Git deals with end-of-line characters.

-- 
Jakub Narębski

```
