How to run Sage with a modified Sage library
The main Sage library lives under the directory devel/sage-main/sage/. Suppose you have modified some part of the Sage library, e.g. add new code or delete some code. How do you get Sage to know about your changes?
You need to rebuild the Sage library so that it is updated with your changes. Navigate to the top-level Sage directory, i.e. cd to SAGE_ROOT, and rebuild the library as follows
./sage -b main
The switch -b is for rebuilding the Sage library and the argument main is the branch you want to rebuild. In this case, you want to rebuild the Sage library as contained in the main branch, i.e under devel/sage-main. The above command does not rebuild everything in the Sage library, but only those files in the library that your changes affect.