Note that there are some explanatory texts on larger screens.

plurals
  1. POWeird behaviour with ignored files and git checkout
    primarykey
    data
    text
    <p>Having two branches <code>master</code> and <code>dist</code>, both have the <code>/node_modules</code> entry in <code>.gitignore</code>.</p> <p>Having no uncommitted/untracked files in both branches, and while I'm on master if I do <code>git checkout dist</code> then again <code>git checkout master</code>, I see that <strong>Some</strong> folders disappear, but <strong>not all</strong></p> <p>Here is the flow with commands:</p> <pre><code>~/p/retwisn git:master ❯❯❯ git status # On branch master nothing to commit, working directory clean ~/p/retwisn git:master ❯❯❯ tree node_modules -L 1 node_modules ├── connect-flash ├── connect-redis ├── express ├── grunt ├── grunt-coffeelint ├── grunt-concurrent ├── grunt-contrib-clean ├── grunt-contrib-coffee ├── grunt-contrib-copy ├── grunt-contrib-watch ├── grunt-mocha-cli ├── grunt-nodemon ├── grunt-shell ├── jade ├── mocha ├── redis ├── redis-url ├── should ├── sinon ├── swagger-node-express └── yaml-config ~/p/retwisn git:master ❯❯❯ git checkout dist ~/p/retwisn git:dist ❯❯❯ git status # On branch dist nothing to commit, working directory clean ~/p/retwisn git:dist ❯❯❯ tree node_modules -L 1 node_modules ├── connect-flash ├── connect-redis ├── express ├── grunt ├── grunt-coffeelint ├── grunt-concurrent ├── grunt-contrib-clean ├── grunt-contrib-coffee ├── grunt-contrib-copy ├── grunt-contrib-watch ├── grunt-mocha-cli ├── grunt-nodemon ├── grunt-shell ├── jade ├── mocha ├── redis ├── redis-url ├── should ├── sinon ├── swagger-node-express └── yaml-config ~/p/retwisn git:dist ❯❯❯ git checkout master ~/p/retwisn git:master ❯❯❯ git status # On branch master nothing to commit, working directory clean ~/p/retwisn git:master ❯❯❯ tree node_modules -L 1 node_modules ├── grunt-contrib-clean ├── grunt-nodemon └── swagger-node-express </code></pre> <p>Although /node_modules is ignored, somehow when switching back to master, some subfolders got deleted. </p>
    singulars
    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.
    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