After install custom app bench update failed with errorfrappe.exceptions.MandatoryError


I am trying to install custom app., 1. bench new-app custom_app -->success, 2. bench --site site_name install-app custom_app --> success , 3. bench update, getting error–>frappe.exceptions.MandatoryError: [Installed Applications, Installed Applications]: git_branch, git_branch

please help , thanks in advance

i got this error to

The problem might be because your custom app doesn’t use git.

When frappe try to get app branch using git rev-parse --abbrev-ref HEAD it’ll cause an error.

You could verify by running
bench execute frappe.utils.change_log.get_versions

Your custom app is likely not having branch info.

To fix this you should run

git init
git add *
git commit -m 'Initial commit'

on your app folder