Update bench change in some available file of erpnext

i am change in some available file of erpnext(python or js file).if i am update then i loss my all change so how i use fixure and hook concept here to save my change.

Develop a custom app and install it along with frappe and ERPNext

refer :
https://frappe.github.io/frappe/user/en/guides/basics/hooks go through docs about fixtures, doc_events


i am only change in available module python file then how i get this change in next version.how i use hook for this