Code based and UI customization in erpnext

Have some questions regarding code based and UI customization in erpnext???
I want to do code based changes where i can do it??
e.g : made some changes in my local system /apps/erpnext/erpnext/hr/doctype/expense_claim/expense_claim.py
is it right way or not?
how to pull code based changes from my local system to live???

have a look at:

http://frappe.github.io/frappe/user/en/videos/