Go Back

Syncronize models with GitHub

GitHub

Introduction

AKM Modelling should be a collaborate task with different team members. The AKM Modeller can save the Models Projectfile to a local file (Projectfile) on your computer (PC). If you are using a GitHub repository to store these models, you can Push the models to GitHub and merge them into a common Main branch, that is also used by your team members.

Procedure for downloading models

Modell and metamodel files are saved as a project (json file) in folders for each sub-project.

Initial step:

  1. Install VSCode editor (Optional)
  2. Go to the "Model" repository ( you need a GitHub account and access rights from the repository owner)
  3. Clone/dowload this repository to your local machine

To Download latest version of the project (models)

  1. Make sure you are in the "Model" repository and in your branch. (not master or main)
  2. git pull (to get latest version, if someone or you have made changes from another computer or cloud)
  3. In AKM Modeller click on the "Model File" blue button and "Choose File", in the Model (light blue) area, then find the file in this local repository folder. ex. ..../github/spacey-model-repo/AKMM-Project_model.json

To upload models

  1. In AKM Modeller click the "Save" button to save the project to a file" (More options under the blue "Model file" button).
  2. Select the project folder in your local repository (default= "Downloads" folder).

To update the project (models) in GitHUb, type the following in the terminal window :

  1. git pull ( this to make sure you have the latest version of the model from GitHub)
  2. git add . (adds all changes files in current directory to the local repository)
  3. git commit -m "change msg" (Commits the changed files with your message about the change)
  4. git push (uploads the local repository (with changes) to GitHub remote repository)

Request for updating the main branch project (models) in GitHub

Go to the GitHub repository and select the branch you pushed above.

  1. Click on the "Compare & pull request" button.
  2. Other people can see the changes you have made, and can make comments and approve your pull request. After approval, the changes can be merged into the main branch.
  3. Click on Merge pull request and the changes will be merged into the main branch.
  4. If you are not going to make any more changes, you can delete your branch, else just leave it and go back to your local repository and the same branch, and do more work on your model.
Go Back