Update ERPNext to the latest version

im using ErpNext version 10.1.5. and ive made many changes to HR app like new doctypes , custom scripts ,a lot of reports and customized doctypes .
is there any way to update to the latest version with out losing my changes ?

Did you added changes in core server-side scripting? then you have to remove them. If you made customization using customize form and custom script then you will upgrade ERPNext to next version.

thanks for your reply
but what i did is adding new fields to exist doctypes (like employee,leave types… etc) and made custom scripts
does it called core server-side scripting and i will lose it ??

You can add custom field in customize form like go to Customize form >> Employeee >> add custom field. if you made any changes in doctype files it will break on next update.