cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone have a good .gitignore template for VSCode?

guyAskingQuestions
Associate

With every rollout of the new and improved, patched together, Frankenstein IDE we all love and to a certain degree, depend on. STM32CubeIDE comes with new surprises! I had been working on a project for the last couple of months with a previous version of Frankenstein. Now I only use it for the CubeMX and flashing/debugging/SWV capabilities while all coding happens in VSCode. My existing .gitignore file was working fine and was able to share work with others no problem. It didn't matter what version of Frankenstein they had, it would work. Then, I had the brilliant idea of finally updating to the latest version of the IDE the other day and quickly realized it was not such a brilliant idea. I have been jumping through hoops, watching every video I can, trying to understanding the new file structure (yes my .gitignore excludes .settings/ and .metadata/ already) yet I can't figure out why when I create a branch in VSC to test a feature, then merge it with the previous branch I was working on, it breaks the entire code. The error logs from both git and the IDE could fill a library. Does anyone have any good .gitignore templates for the STM32CubeIDE v1.18.0? Or have any resources you found helpful in getting away from the IDE entirely? It has halted progress on my project who's deadline is coming up and any tips, resources, wives tales, etc.. about how to figure out how to not have it break my projects every time there is an update would be much appreciated!

5 REPLIES 5
Nawres GHARBI
ST Employee

hi @guyAskingQuestions 

do you search a .gitignore for VSCode or STM32CubeIDE ? 

could share even a tiny project showing the same issues so we can debug with you and get the root cause ? 

guyAskingQuestions
Associate

Thank you for your reply @Nawres GHARBI!

That was the very first thing I did, search for a .gitignore for VSCode and STM32CubeIDE on GitHub. However all the ones I found were for previous versions and even the most recent one I could find was causing trouble even after spending hours of creating repositories in separate folders with no metadata, settings, or git information from the problematic repository.

Unfortunately, my company deals directly with clients creating custom solutions. Due to this, I am required to sign an NDA for each project preventing me from sharing any code.

Any tiny projects I use for simple tests are not published to GitHub as I have a backup disk that I wrote a small script to automatically store a copy of the previous version on save.

The good news is that after a lot more digging and asking every AI engine out there I manged to create a .gitignore that has been working so far.

It would be nice with every update to add a .gitignore file  to save others the time it took me to put one together.

Thank you for the response!
guyAskingQuestions :)

Rodo
Senior

Have you tried STM32CubeIDE v1.18.1? STM32CubeIDE v1.18.0 had some bugs. I downgraded back to STM32CubeIDE v1.17.0 and have not tried STM32CubeIDE v1.18.1 yet. I do not use VS code though.

Nawres GHARBI
ST Employee

Hi @guyAskingQuestions 

glad to know you fixed you issue, if the .gitignore doesn't contain confidential data of your company could share it please in the thread to help any one having the same issue

 

Pavel A.
Super User

First thing first: do you have a good baseline version of both source and tools (IDE...) that can be deployed on a clean machine and works? If not - too bad.

Next, what have you updated: CubeIDE or VS Code with the ST add-on and its dependencies?

If this update was not required (as, for example, by customer requirement) - use the previous (good) version and be happy. Then you deal only with changes in your project, including the gitignore.

As stated, there are too many changes at once, proven recipe for grief.