Pio + Version control

How do I use PIO projects with Git? Especially with the clion ide. What files I have to commit and how can I open a project after pulling from git?