The problem is that it keeps instructing the LLM (here: Sonnet 3.7) to KEEP ADDING STUFF to my project, which I did NOT ASK for and Sonnet just takes the ball and runs away with it like Forrest Gump on crack!
Tell me about it!!! This has driven me bonkers too. However I’m learning as a baby non-tech developer. Oh my word. The worst that happened to me this weekend was my files being deleted from my frontend project and it took me 2 days to get back to where I was, so I learnt a huge lesson about trusting machines too much! And of course replicating my project in separate folders and also in my backup external drive
THIS. Yesterday I am telling cursor to add something within the code and don’t do nothing else. Then it proceeds to completely destroy the code by removing blocks of it that I literally told it not to modify! I ask “why did you remove this?” then it just admits and does nothing about it. This still continues until today.
Initialize a git repo on every project using the git init command, or doing it through the UI. This will start you off with a main or master branch. Consider that branch as the most recent fully working state of your project.
Whenever you’re working on a new feature, create a new branch. Name it something that tells you what it is like feature/navbar or bugfix/broken-images.
Every time you make a change (and I mean every time) commit that change to the branch you made. It’s like quick save in a video game. Make the commit message descriptive so you can easily look through history and see what was done. Ex: "Change login button color". If something goes wrong, you can always revert back to any previous commit very easily, and your code is just like you left it there.
Once you have the feature working and implemented, merge your branch back into the main branch.
Repeat this for every feature, bugfix, etc.
NEVER make changes directly on your main branch Don’t commit broken code to your main branch Do make new branches for every type of change, fix, or experiment Do host your git repo remotely, like on github
There’s no cost to using git and commits aren’t a scarce resource so learn git and use it constantly. It’s better to make a dozen commits for one small change than lose all progress on your entire project.
It’s a tough lesson to learn for sure, I’ve been there but getting into the habit of using git is one of the best quality of life improvements you’ll have learning to program
You use git to ensure the AI doesn’t cause irrevocable changes to the codebase. Asking it to use git for you is like giving a burglar the keys to your house lmao
the point is: Cursor is for Non-Developers; actual developers use git; non-developers use cursor, ofc VibeCoding is not about developers creating software, but normal people creating software for their first time - do not expect normal people to use git
I had Cursor (sonnet 3.5) build a deploy script for our website. I was lucky not to use YOLO that time since it eventually wanted to run rsync with the -d flag to upload a video to the website root via ssh. This would essentially delete ALL files recursively, leaving only a mp4 at the root
Cursor docu lists also Local History Extension which then will contain copies
Git can be used locally without Github as well.
You as user should do the commits first, Cursor does offer you automated summary of each commit (there is a button for that). But you can also set in your rules for AI to commit changes when it is complete, that way even if it makes mistakes its not lost.
Also there are other online Git repositoriy providers like GitLab etc. Overall its recommended to use at least private remote (online) repositories so if your local folder is deleted you dont lose changes. You or AI can push those commits to remote repositories.
The chat history leaking like this is weird, and definitely not the experience we want in Cursor, but we never inject any kind of weird instruction into the prompt, it is basically just a system prompt we have written, your code and your own prompt that makes it in.
Do you have a non-privacy mode request ID for these chats? If so, this would be super helpful in getting this fixed!
Hey Dan,
sorry, I’m re-setting running chats constantly (going back to previous messages) and do not have that chat message anymore.
Idk if you can (in combo with my user) search for the last “<user_query>” in the 2nd image at the bottom, e.g. “add a small hint message”?
That whole tag content is NOT coming from me.
Stranger things have happened, but I doubt this is hallucinated by Gemini itself.
A question for better understanding on my side and perhaps to exclude that possibility, as i had something similar/related.
Can this be ue to the history chat length on that thread e.g. a lot of data in context (files, rules, chat length)?
I had in such cases sometimes the effect that AI hallucinated my input as it was overthinking. That was in my case very clear by the rules i used which contained a specific output marker that is extremely rare.
that’s one way to do it, however git is explicitly designed for this task, integrated directly into the IDE, and is much easier to switch between versions and checkpoints