* For projects that don’t have built-in git integration eg. RT-Thread Studios.
* Visual studio has built-in git integration.
Initial Setup (Github Desktop, and on RT-Thread Studio)
Github Desktop
- Download and install GitHub Desktop at Download GitHub Desktop | GitHub Desktop.
- Log in with your account.
RT-Thread Studio
- Create a folder for a separate workspace. (eg. Desktop>rt-threadproject). This step is to avoid accidental commits/mixing projects. Use the original workspace for projects that do not need to be pushed to GitHub.
- At RT-Thread Studio, go to File > Switch Workplace > Other…
Click browse, and then select the separate workspace folder that you have created.
Initial Commit
- Create a new repository on github.
- Add README to On.
- Add .gitignore, any, afterwards can be edited.
- At Github Desktop, clone the repository that you have created at step 1.
- Local path choose the workspace folder that you have created during Initial Setup.
- The folder will “clone” the files from github.
- Go to RT-Thread Studio and export the project.
- Select File System.
- Choose the directory as the cloned project folder.
- Go back to RT-Thread Studio, switch to the separate workspace, and then Import the project from the separate workspace folder.
- At Github Desktop, you’ll see a lot of changed files.
- You can type the summary as “Initial commit”.
- I did it before, so I am just showing the “History” tab.
- So now, whenever these are any changes to the code, it will show on Github Desktop.
- Then you can commit the changes, and push it to GitHub.
New laptop/user
Follow step 2 of the Initial Commit section.
At RT-Thread Studio, import the project from the separate workspace folder.