Studio <--> git integration question/etc

Being a total newbie to git (hey we’re a 4 person company and we all always work on separate things so never saw the new for it…) and such I made a few mistakes when I first setup git and added my project to it via the Studio integration. Not knowing what “unversioned files” meant I added quite a few of them and now of course they keep getting updated and thus pushed with the commits and such. It’s a pain. Things like the .bin files, log files, .class files and such.

What’s the best way to get rid of them from the local repo, and make sure they don’t get added back? Is it something doable from inside the IDE or will I need to use git command line commands?

Hello @jon.craig, the fastest is to configure your gitignore file. It is a hidden file in which you specify what you want to omit.

Regards,

Nelson F.

This is true, however, adding to .gitignore doesn’t remove previously (newbie mistakenly) added files.

I did find a way to do so.

So my remaining question is - what’s best to leave out? The entire contents of tomcat/deploy, .gradle, and all build/ directories, I’m guessing?

I do not think it is a good practice since they are files that change with development. What already exists you can delete from the repository. Now what already exists, I’m left so you can lean on the documentation.

Hi @jon.craig,
Have you changed the standard .gitignore file generated by Cuba Studio? I have been using the standard one in my projects without a problem.

Take a look at the cuba-petclinic .gitignore file for a quick reference.

Regards,
Peterson

Oddly, none of my projects ever had one! I’ll copy that one; @mario made it so it’s got to be good. :smiley: