Skip to main content
All CollectionsTroubleshootingComparisons
Metadata missing when committing to git branches
Metadata missing when committing to git branches

Why are some objects not being checked into repositories?

Valerio Chang avatar
Written by Valerio Chang
Updated over a week ago

Are you using Gearset to deploy and commit to a git target and finding that some or all expected metadata aren't showing up in your git branch after deployment? This article helps you debug the possible causes.

There's a few different things that can change the expected outcome of a commit to a git branch. The way to check this would be to download the package being committed and see if it contains the metadata you expect to see.

No, the package is missing what I expect to commit.

  • Problem analyzers

    Are problem analyzers being triggered that are removing metadata from the package that you are trying to deploy? See this article for what Gearset's problem analyzer looks like.

Yes, the package is correct, why is the commit missing metadata?

  • .gitignore or .forceignore file

    On the branch you are committing to, do you have a .gitignore or .forceignore file, usually in the root of your repository that is filtering out the folder paths or file extensions of the files you are trying to commit? If it is, can you remove the exclusion from the file? Feel free to send us the files to have a look for you.

    Example: You are committing a static resource with a folder path containing a dist folder, but your .gitignore file filters out dist directories.

  • Repo dependency cleaner

    Could the repo dependency cleaner removing metadata from your repository? See this article for how Gearset's repo dependency cleaner works.

  • Repo structure

    It is possible that Gearset is not able to write to your git target in the supported format. Check if your repo structure is one of the supported ones. Are you able to attach a directory tree (something like git ls-files ) for us to have a look?

    More information on this command can be found here:
    https://git-scm.com/docs/git-ls-files

  • Metadata already in the repo

    It is possible that Gearset is not able to write to your git target because the metadata is already in the target repo? This typically happens with the comparison setting is set to not show you managed package items, so they look like New in the comparison, but the items are actually in the repo already.

Did this answer your question?