Changes made to doctype gone after update

Dear All
thanks for your hard work
i was running v 5.0.22
and i made some changes for doctype stock entry form core doctype adding fields and hiding field

then today i runs bench update and git error that my changes will be overwrite
then i run git stash in appe/frappe and appe/erpnext
and bench update work fine then git stash apply git stash drop in each appe folder

all my changes to doctype are gone now How to git them bake with the updated erpnext v 5.2.0

thanks

@ashraf_brzy1 you should never directly update DocTypes in production use. Use Customize Form / Custom Fields for this. They will not get over-written