https://prefect.io logo
m

Mattias Petter Johansson

09/14/2023, 3:14 PM
@Marvin when working with git, what prefect stuff should be commited and what should be added to gitginore?
m

Marvin

09/14/2023, 3:15 PM
When working with Git in the context of Prefect, you should commit any changes to your workflow code, configuration files, and other resources that are integral to your project. This includes any changes you make to your Prefect tasks, flows, and any other Prefect-specific code. On the other hand, you should add to your
.gitignore
file any files that are generated during the execution of your flows. This might include log files, temporary data files, or any other files that are not necessary for defining your workflows but are produced as a side effect of running them. Also, if you are using Prefect Cloud, you don't need to commit your Prefect Cloud API key to your Git repository. Instead, you should set this as an environment variable in your deployment environment. This is a good practice for handling any sensitive information in your project. Remember, the goal is to commit any changes that are necessary to define and run your workflows, while ignoring any files that are not necessary or could potentially expose sensitive information.