Hi wz z,
For detailed directions on setting up and using git, go to https://docs.moodle.org/32/en/Git_for_Administrators
As mentioned by Emma, you do need to make sure you are tracking the correct branch. It has been my experience that following these directions will leave alone all the plugins that I have added.