[git] Adding a folder to `.gitignore` should not add every single file
See original GitHub issue- VS Code Version: v1.57.1
- OS Version: Win 20H1
Steps to Reproduce:
- Create an empty repository
- Do
npm init && npm install whatever
- Switch to the SVM view
- Oops, you have one bajillion changed files in your working copy! Right-click the
node_modules
folder in the SCM view and choose “Add to .gitignore”.
Expected behavior:
node_modules/
is added to the.gitignore
.
Actual behavior:
- Every single file in the
node_modules
subtree of the repository is added separately to the.gitignore
…
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
.gitignore File – How to Ignore Files and Folders in Git
Inside . gitignore , you can tell Git to ignore only a single file or a single folder by mentioning the name or...
Read more >Make .gitignore ignore everything except a few files
To fix, add (!*/), which matches any subdirectories (recursively) in current directory. This won't help the parent answer, which is whitelisting specific files...
Read more >How to Use a .gitignore File - Pluralsight
It lets Git know that it should ignore certain files and not track them. ... However, you can put it in any folder...
Read more >.gitignore file - ignoring files in Git | Atlassian Git Tutorial
Git sees every file in your working copy as one of three things: ... Ignored files are usually build artifacts and machine generated...
Read more >Ignoring Files and Directories in Git (.gitignore) - Linuxize
Git also allows you to create a global .gitignore file, where you can define ignore rules for every Git repository on your local...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LinqLover @lszomoru Hey, I think I fixed the issue! Could you take a look at my pull request?
@danila-grobov I would start here and here. I am not into the VS Code impl at all, but as there is no enumeration of files, I fear that the UI could always pass all single children of the selected item to the command … Great that you are looking into this! 😃