user3711357
user3711357

Reputation: 1625

files shows as changed even just pull the new git branch

In git kraken, pull origin and checkout the branch. Immediately, it come with couple of files changes even not done any modification. When seen changes and "Ignore white space" to true in viewer then it shows as below: "File contents are unchanged. Uncheck "Ignore white space" to see potential white space changes."

when try to discard those files then its unable to discard, try to stash those files then it stash and immediately unstash.

How to solve this issue so, git kraken work correctly and does not show me files are changed even its not change, (it just pull the new branch).

Thanks

Upvotes: 0

Views: 1068

Answers (2)

scisteffan
scisteffan

Reputation: 11

This is caused by the behaviour of the AutoCRLF setting. I'm running GitKraken on Windows with Windows Server so I don't need this setting turned on. To resolve I did:

  1. Go to Preferences > General, turn off AutoCRLF option
  2. Update / delete .gitattributes file so that automatic normalisation of line endings is turned off

Upvotes: 1

Marina Liu
Marina Liu

Reputation: 38116

To discard the changes, you can use any of below options:

Option 1: Undo changes in GitKraken

You can undo the changes by clicking Undo button in Gitkraken.

Option 2: Reset by git commandline

You can also discard the changes below executing below command in your local repo directory:

#In your local repo
git reset --hard HEAD

Then the working directory will be clean.

Upvotes: 0

Related Questions