Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIT: The git repository at XXXX has too many active changes, only a subset of Git features will be enabled. #41699

Closed
tomuta opened this issue Jan 16, 2018 · 9 comments
Assignees
Labels
git GIT issues info-needed Issue requires more information from poster

Comments

@tomuta
Copy link

tomuta commented Jan 16, 2018

I have a few GIT repositories that produce untracked directories that contain thousands of files. An easy work-around is to add them to .gitignore, but I don't own these repositories.

A regular git status on the command line shows only a few untracked folders, but in VS Code I get this warning because it counts all files inside these folders. I tracked it down to this line of code:

https://github.com/Microsoft/vscode/blob/master/extensions/git/src/git.ts#L1091

-u defaults to "all", however a regular "git status" defaults to "normal", meaning it only lists the untracked folders but not their contents.

I think it would make more sense to just list what regular "git status" lists for untracked files, and then maybe have the ability to expand these untracked folders to show all untracked files allowing them to be staged. But in my mind, it shouldn't count them against the 5000 limit.

@vscodebot vscodebot bot added the git GIT issues label Jan 16, 2018
@joaomoreno
Copy link
Member

Why do you have Git repositories with huge folders inside them, which you never commit? Is there a reason behind it?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Jan 18, 2018
@tomuta
Copy link
Author

tomuta commented Jan 18, 2018

The build system generates those folders. Like I said, a .gitignore would be a work-around, but at the same time I only see literally 4-5 untracked folders with a regular "git status", yet VS Code pops up the 5000 limit warning and lists every single file inside. I wish it just showed those 4-5 untracked folders, and maybe give me the option to expand them if I really wanted to.

@joaomoreno
Copy link
Member

A .gitignore is not only a workaround, but it really is the solution. I suggest to simply use it. Life will be easier across all tools.

@jekkuh
Copy link

jekkuh commented Jan 30, 2018

Where should I place this .gitignore file? VSCode's git repo is in my /users/name on my mac. I may sound stupid but new to this part. Should I try and point git somewhere else or do I need to place a .gitignore file into every folder I don't want being watched under my user account?

I have so many un-commited files from different projects and it won't let me un-stage them. The error I get is "Git: fatal: Unable to create '/Users/Jessica/.git/index.lock': File exists".

I'm lost and can't find any answers online.

@joaomoreno
Copy link
Member

@jekkuh Do you really need that git repo in your /Users/name? If not, just remove its .git folder. Else, you can configure .gitignore quite easily. Here's how we do it. Here's more info: https://git-scm.com/docs/gitignore

@tbluemel
Copy link

It's really just obnoxious. I have a large number of such repositories, git status shows only a very small number of directories (most often just one) in each, but VS code complains about the 5000 limit all over just because it counts each and every single file within these folders. Yes, a .gitignore would solve it, but at the same time I would expect the same behavior as a regular "git status"...

@stacype
Copy link

stacype commented Feb 5, 2018

OMG happened to me too but used this tip above " just remove its .git folder." worked great thanks what a panic that created.

@dpfeuffer
Copy link

Why does VSC consider a ~/.git repo when the opened workspace folder is in a subdirectory (e.g. ~/work/myrepo)? I would expect, that VSC observe only git repos in and below the opened workspace folder but not above it. Removing the ~/.git folder is no solution when you have created this repo on purpose and require it.

@b-45
Copy link

b-45 commented Feb 17, 2018

I get this 5K warning whether git is initialized in my working folder or not.
My setting for git is currently set to false to avoid dealing with the 5K issue. Any recommendation for a permanent solution would be much appreciated.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants