cancel
Showing results for 
Search instead for 
Did you mean: 

Gitignore in CubeIDE. What files do you like to ignore?

DJC
Senior

Which files/folders to you like to put in .gitignore ?

I tend to put: Debug and Release because I'm happy to rebuild on new platforms.

But, I also put Drivers and Middlewares since they can also be sourced from ST repos.

I'm wondering also how people manage .project and .cproject since I've lately had some issues with cross-platform development between different developers.

4 REPLIES 4
eduardo_reis
Associate III

Does anyone else recommend to version these Folders: Middleware and Drivers?

@eduardo_reis Of course, because these are part of your firmware. You can check in the copies in your project tree, or, better, make a private fork of the ST repository from github, or parts of it (CMSIS, Middlewares and HAL drivers are now separate sub-modules in the "Cube packages", you can clone only these sub-repos).

Do you mean, having these as `gitsubmodules` in my repository? Don't those folders get downloaded and moved into my project when configuring it from the `.ioc` file?

Pavel A.
Evangelist III

Yes, this may be a good idea to have these components as git submodules. When you let CubeIDE/MX copy these files into generated project, this has certain benefits (self-containing tree structure, simpler project) but IMHO makes harder tracking original versions of the components. There are many variants. All I'd like to say - this stuff is part of the program, so it should be checked in or tracked. Same about the toolchain and C library (newlib): part of the project, should be tracked.