1

In Sourcetree (3.4.10) if I stash my current folder, the files that were modified pops back again in my "unstaged" area.

this even though I havn't selected the flag "keep staged modifications".

git version is 2.37.0 on Windows10

Also if I

$ git status  
Changes not staged for commit:
     modified: myfile.cpp
$ git stash  
$ git status  
Changes not staged for commit:
     modified: myfile.cpp
$ 

I find the list of modified files that in my ideas should have been stashed

EDIT:

also p4merge (called from sourcetree) says:

0 diffs (Recognize line endings and whitespaces differences), tab spacing: 4, encoding: UTF8, No BOM

5
  • i wonder if some EOL reformatting might be taking place. Commented Dec 14, 2022 at 9:40
  • @eftshift0 I don't think so: p4merge should have detected those, but I got 0 diffs (Recognize line endings and whitespaces differences), tab spacing: 4, encoding: UTF8, No BOM Commented Dec 14, 2022 at 9:43
  • Just today there was a report on the Git mailing list about unwanted behavior of git p4 in connection with UTF-8 encoded files that lose the BOM. Is it the same problem that you observe here? Commented Dec 14, 2022 at 9:58
  • Hard to say without more details or a reproducer, but typically this happens when you're on Windows or macOS and have a commit that contains files whose name differs in case (e.g., the commit has both README and ReadMe files). As the working tree can only hold one of the two files, but both are actually checked out, one of the two is probably modified. Stashing saves it and leaves you with the other one, which is now modified. Commented Dec 14, 2022 at 10:54
  • In my case files are UTF8 without BOM (need characters like è à working on both win and linux). I havn't files whose names differs just by case Commented Dec 15, 2022 at 10:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.