How to keep origin point/cursor on object
this one for blender 2.8 and above
Apart from the answer I found on this forum, this one worked for me.
I was facing this problem where pivot was offset to object


In this you press F3 and type set origin
this will appear

Then I just selected geometry to origin 
and the problem was solved,
pivot moved to the center of object.