Can't connect to github - VScode with PlatformIO

While developing Arduino and ESP32 projects using PlatformIo on VScode, I tried to follow online tutorials on how to connect to Github, I did many trials and probably need to reset and do it properly. Can someone please guide me how to so it properly, so i could save my project to the Github repository/.