How to Exclude Managed Package Metadata in Git

Copado does not recommend adding a third party’s Salesforce managed package to your own code repository. You can make use of Git’s .gitignore file to ensure the third-party package does not get added to your own code repository.
 
If you are not customizing a managed package, you can keep your repository clean by ignoring all files for that package. To do so, add to your .gitignore file the following text: *PackageName__*
 
If you have experience in handling third-party managed packages within your code, you need to make sure that the same version of the package is installed in all your environments.

How did we do?