What is the Best GITIGNORE setting for VS Code for IBM i?

What is the .gitignore file?

The .gitignore file is like a bouncer for your Github club, deciding who gets in and who stays out. Let's dive into creating a .gitignore file in Visual Studio Code, so you can keep those unwanted files off the dance floor of your repository.

*cough*

Let's try that again, wearing a more sensible hat:

When working with Git and VS Code on IBM i, you may want to exclude certain files and directories from version control that are specific to the IBM i environment and are not needed in your Git repository. We use a file called .gitignore to do this.

All deployment methods will respect the .gitignore file, avoiding the deployment of files that match the patterns specified within it. 

For instance, including this pattern in .gitignore will exclude files within the .vscode file (my personal visual studio code settings) and some other common settings that I don't want to share with my team:

.gitignore

.logs
.evfevent
.env

# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Common credential files
**/credentials.json
**/client_secrets.json
**/client_secret.json
*creds*
*.dat
*password*
*.httr-oauth*

# Private Node Modules
node_modules/
creds.js

# Private Files
*.json
*.csv
*.csv.gz
*.tsv
*.tsv.gz
*.xlsx
My GITIGNORE setting for VS Code for IBM i

Any recommendations for improvement?

If you see any mistakes, bad practice or just have an idea for improvement please leave a comment below 🙂

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>