FHIR Chat · Git won't stash · committers/git-help

Stream: committers/git-help

Topic: Git won't stash


view this post on Zulip 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....

view this post on Zulip Grahame Grieve (Oct 06 2020 at 09:44):

what is going on?

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip 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