Note that there are some explanatory texts on larger screens.

plurals
  1. POgit checkout remote branch shows extraneous files?
    primarykey
    data
    text
    <p>master branch has these files and folders (simplified):</p> <pre><code>C:\Local\TickZoom\Project&gt;ls file.txt name.txt public </code></pre> <p>public branch is tracking a vendor repository and has been subtree merged as public folder in master branch above. public has three folders only (simplified):</p> <pre><code>C:\Local\TickZoom\Project&gt;ls platform providers www </code></pre> <p>When switching from public to master it behaves correctly.</p> <p>However, when switching from master to public, an odd thing happens. It has all the files and folders of both combined:</p> <pre><code>C:\Local\TickZoom\Project&gt;git checkout public C:\Local\TickZoom\Project&gt;ls file.txt name.txt public platform providers www </code></pre> <p>However, checking git status says nothing has changed.</p> <p>I discovered that 'git reset --hard' fixes public back.</p> <p>CLUE: It seems that this only happens after making a new commit to master. Does git do some kind of automatic merge?</p> <p>After 'git reset --hard', the checkout to master and back to public work fine, even if repeatedly.</p> <p>The first, I thought it was fixed but it occurred again the next time I made a change. Let me try that one more time now to make sure...</p> <p>Now, I can't reproduce it. But it did happen twice.</p> <p>One other CLUE is that the first time I did a git reset --hard it complained about files being locked by processes.</p> <p>After the offending programs were closed, the git reset --hard succeeded and then the checkout worked between the two branches.</p> <p>So does the checkout get confused by files being locked and "silently" fail? It would be better, it that's the problem to fail the same way git reset --hard does than just reporting success and having a jumbled workspace.</p> <p>Any other wisdom or options to set on git checkout to avoid this will be appreciated.</p> <p>Wayne</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload