Skip to content

github.com project: folder mentioned in .gitignore is lost on page reload #3301

@cristianbogdan

Description

@cristianbogdan

Description of Bug

I needed to add a temporary folder to test my github repository stackbliz project (e.g. https://stackblitz.com/~/github.com/kth-csc-iprog/unit-tests?file=index.js&view=editor) . As the folder was temporary, I added it to .gitignore. The folder kept vanishing on stackblitz.com page reoload (or opening the project from the dashboard in another browser tab)

Removing the folder from .gitignore keeps the folder between reloads.

Steps to Reproduce

  1. In stackblitz dashboard, look at github repositories. In my case it is an organization repository: https://stackblitz.com/orgs/github/kth-csc-iprog/repositories
  2. Open a repo
  3. Add a folder like "src" to .gitignore
  4. Commit and push .gitignore
  5. drag and drop a folder with that name from the OS desktop
  6. reload page. The folder will not show up. It seems to be treated similar to node_modules (which is most often in .gitignore)
  7. remove the folder from .gitignore. Commit and push
  8. drag and drop a folder with that name from the OS desktop
  9. reload page. The folder is now shown, now it is not lost between reloads

Expected Behavior

The folder should be kept as it contains working files, even if the files will not be committed to git

Additional Context/Questions
It may be that this also happens with files, not just folders

I also noticed strange behaviors with .gitignore. Uncommitted .gitignore changes are sometimes lost between page reloads. Sometimes .gitignore is simply an empty file after reload. I need to do "git checkout .gitignore" in the Terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions