MATLAB: How to create a Simulink Project under Source Control (Git) and upload it on a remote repository (GitHub)

.prjbranchbranchescontrolgitgithubprojectremoterepositorysimulinksource

I would like to create a Simulink Project and put it under source control.
Also, I would like to create a new branch and push it from Simulink Project onto GitHub.
What are the steps I need to follow ?

Best Answer

1. Open Simulink Project (PRJ file)
2. Click on 'Use Source Control' and 'Add Project to Source Control'
3. Change Source Control Integration to 'Git', select your local Project root, and Click on 'Convert'
4. Click on 'Open Project'
5. In Simulink Project, go to the 'Modified Files' view and click on Commit (you can enter any comment), then click on 'Submit'
6. Under the Simulink Project tab, go to 'Share' and select 'GitHub'
7. Enter your GitHub credentials and add any Repository Name. Then, click on 'Create', and then 'Yes'
8. Click on 'Reload Project'
If you then would like to create a new branch and push it:
9. In the Simulink Project tab, click on 'Branches'
10. In the 'Branch and Tag Creation' pane, enter 'SecondBranch' as 'Name', and then 'Create'
11. From the dropdown menu in the Branch Browser, select 'SecondBranch', then 'Switch', and then 'Close'
12. In the Simulink Project tab, now click on 'Push' and enter your credentials
For further information: