4D Blog

Home Product gitignore and 4D: a useful feature for Git users

gitignore and 4D: a useful feature for Git users

July 20, 2021

Product

Project mode allows you to easily track changes with Git, the most popular version control system. But often, you don’t want to track all the files of your project in the Git repository. 4D now offers you the possibility to define what not to track in your new projects.

When you create a 4D project and a Git repository for it, Git will track all changes in the project folder. But it’s not necessarily relevant to track all the files placed in the project folder. For example, tracking binary files that are constantly updated, such as the data file, is rarely relevant. This also applies to users’ files or working files.

Git lets you specify the files you want to exclude from the repository using a .gitignore file. You can learn more about .gitignore files on the official Git documentation website.

From now on, 4D gives you the possibility to automatically add a default .gitignore file in your project folder. The file is taken into account at the first commit. A new checkbox is available in the preferences dialog:

Once you activate this option, all your new projects will include the following .gitignore file:

blank

And here are its default contents:

blank

This default file will exclude the following elements from the repository:
– the Data folder. It may better to back it up with 4D.
– the DerivedData folder is a working folder. 4D rebuilds it automatically when needed.
– the Libraries folder is a working folder. 4D rebuilds it automatically when compiling for Silicon on macOS.
– the developer’s user preferences
– the trash is not excluded by default, but if you want to exclude it, just remove the comment (# )
– the files automatically generated by macOS and Windows in folders containing pictures

Reminder: Files and folders mentioned in the .gitignore file are case-sensitive.

The cherry on the cake, you can define your own default .gitignore file by clicking on the button at the right of the checkbox in the preferences dialog. A text editor will then open your own default .gitignore file. You can modify it as you want, and it will be included in all your new projects, thus limiting time loss and oversights!

Discuss

Tags Git, Programming, Project, Source control, v19 R2, v20

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

Avatar
Damien Fuzeau
• Product Owner •Damien Fuzeau has joined the 4D Product team in February 2019. As a Product Owner, he is in charge of writing user stories, then translating them to functional specifications. His job also entails making sure that the feature implementations delivered are meeting the customer needs.Damien is graduated from the University of Nantes in software engineering. He spent more than 23 years in its former company, first as developer (discovering 4D in 1997), and later as engineering manager and software architect. This company is a 4D OEM partner and deployed 4D based business softwares for thousands users, on hundreds servers. So, Damien is used to 4D development and deployment in a multi-language context.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy