Stream: committers/git-help
Topic: Git won't stash
Grahame Grieve (Oct 06 2020 at 09:44):
git remains confusing. I have a repo cloned to a local directory on a linux pc (ubuntu 20). I have committed one file, which I'd like to push to master.
Someone else has pushed to master, so I have to pull. When I pull, I get a list of files that have changed - none of which I have actually changed. The differences is all whitespace related. Don't know the deal is.
Anyway, 3 different git gui clients can't get rid of the damn files. Cannot stash them or abandon them, or revert them - whatever language they use. They let me do it, but the file never goes away. Git stash creates a stash.. but nothing changes.
And, of course, git pull fails because I have these uncommitted files in the way....
Grahame Grieve (Oct 06 2020 at 09:44):
what is going on?
Oliver Egger (Oct 06 2020 at 10:04):
is it whitespace or line endings which is causing the problem? if it is line ending you can configure the git client or repository to ignore those: https://stackoverflow.com/questions/20496084/git-status-ignore-line-endings-identical-files-windows-linux-environment
Joel Schneider (Oct 07 2020 at 18:35):
Another article on the line endings topic:
https://docs.github.com/en/free-pro-team@latest/github/using-git/configuring-git-to-handle-line-endings
Grahame Grieve (Oct 07 2020 at 19:10):
I gave up abnd made my own copy of the changes and blew my local copy away. no problems after that
Last updated: Apr 12 2022 at 19:14 UTC