How to sync PyCharm Python code over multiple Devices?

HI there

So im quite a noob when it comes to the whole programming side of things. I only did Python on a school level. Recently Ive been doing personal tasks on paper that I figured I could write code for and create a simple program to make my tasks more efficient and easier to complete.

I’ve been using the latest version of PyCharm community/Free edition to write my code on my desktop. But I also have a laptop and wish to continue with my program on that as well. I have the same edition/version of PyCharm on both devices.

I’ve currently been using Google Drive to upload the program to manually, and then redownloading it on the other device to continue working.

I’m looking for a way, GitHub or any other way, where I can sync/autosave my code ,as I write it in PyCharm, to a common cloud/server/website/drive (example: google drive, onedrive, icloud etc) and then access the updated code via my other device. And visa verca. I’ve tried using github but have not been succesfull thus far.

At the moment this is my routine for an example:
Desktop:
print(“Hello World”)
Save to google drive

Laptop:
Download from google drive
Open via pycharm
Add new code

rinse and repeat. This has become very tedious and if I forget to upload it to google drive I do not have the latest version of my code.

Apologies for the rambling, I wanted to make sure I got my exact problem across :slight_smile:
Thankyou for any help, would be much appreciated :slight_smile: