Can Cursor "learn" about the git & file structure aspects of a repo?

Note, Because I just joined, I’m only allowed to add one image. Hopefully soon I can edit with more images to help clarify this post (An error occurred: Sorry, new users can only put one embedded media item in a post.)

Question: Is it possible for Cursor to learn about the git meta-data of a repo? Right now I’m striking out:

The Cursor App clearly knows what branch I am on (bottom left corner).

But the LLM has no idea:

(Just to be sure, I even directly opened the .git folder, but Cursor still claimed it had no way to see this information.)

Beyond git, Cursor seems to have a lack of “meta”-awareness of the file structure, even when specific folders are selected:

how many files are in the content/works folder?

As an AI, I don’t have access to your local environment or any real-time information about your system, including the number of files in a specific folder. However, you can check the number of files in the content/works directory by running the following command in your terminal:

One of the value propositions of Cursor vs Copilot is that it can read the whole repo. So of course the first questions I’m going to ask it are about the repo (branches, file structure, commits, etc) not just the code in the active file.

For example, it seems like it would be incredibly useful to be able to do/ask things like:

  • What’s the different between branch A and branch B?
  • How many files are in this folder?
  • Where is the css being set? (This one was particularly disappointing, as I would expect Cursor to be able to do this based on the product description):

where is the css for this element set?

Based on the provided information, it’s not possible to determine exactly where the CSS for the read-more-link class is set.

For clarification, when I wrote the post above, I hadn’t yet gotten the memo that you have to do ctrl + enter to chat with the whole codebase.

The answer to my last question is marginally improved:

But it seems silly that after all of that, it wants me to search for the element in some suggested files, instead of Cursor searching those files to actually answer my question.

(even with the ctrl + enter, Cursor still doesn’t know git (what branch am i on?) or file structure (how many files are in this folder? )

1 Like

Try command + option when submitting a chat message! Hidden mode that gives the model access to ripgrep. Or bash mode.

1 Like

thanks!

so i tried ctrl + shift + enter (on windows rn), which seems to be a step in the right direction, except that now i need Cursor to learn how to count:

the correct answer:

image

Try Control + Alt + Enter?

so here are a few more examples. i switched to mac, turned on the experimental bash, and also am using command + option + return.

still no dice on correctly counting files:

re: my other code context questions…

it appears to know CSS when given CSS .post {


but can’t make the leap from html to CSS: class="post" to .post {

ok update with a small “file structure” win :partying_face: via bash mode and the prompt: use bash mode to figure out how many files are in the content>works folder and using command + option + return

still would appreciate any tips on how to get Cursor more context on git structure and project structure.

I didn’t know this was a thing. The UI only tells me about Ctrl+Enter to include the codebase. What does Ctrl+Alt+Enter do in addition?

Gives it access to ripgrep primarily! Sort of a hidden mode, since we started to go more towards the route of building search engine for the bot instead of having it use tools.

1 Like