Hi Abhijit,
Your commits will be migrated too.
Only check the amount of commits in the documentation. If you are below 2500 commits you're good to go.
First go to Team Server (with ScrumMaster role)
Then click Migrate to GIT
Mendix will perform checks if you could migrate to GIT:
After that you get confirmation and you can migrate to git.
Documentation how to migrate to git is here:
https://docs.mendix.com/developerportal/general/migrate-to-git/
Hopefully this helps.
Regards, Martijn