Rename a project mpr file in a git controlled repository - Mendix Forum

Rename a project mpr file in a git controlled repository

1

Hi, Just wanted to share the process which worked for us recently: (using tortoise git approach)

  1. Open the project in Studio Pro. Don't run it.
    1. If already running, then stop it and clean the deployment directory.
  2. Rename the  <old_appname>.mpr file using git rename mechanism to <new_appname>.mpr,Git option for file rename.png
  3. Then do a commit taking help of tortoise git approach. (before this commit don't open the project in Studio Pro).
    1. You will be asked for username and password to perform above action.
    2. Username : your email id used for accessing the project.
    3. Password : A token generated from Mendix profile page.
      1. Go to mendix sprintr portal > Your Profile > User Settings > Developer Settings > Generate a New Token.
      2. Make sure to select below scopes,​​​​​​​image.png
  4. Copy and store the token in a notepad since this is viewable only once.
  5. After commit is done, open the .gitignore file and you would see automatically two lines added for .mpr.bak and .mpr.lock with the new project name.image.png
  6. So clean the other two entries for .mpr.bak and .mpr.lock with old app name. Don't remove the new ones.
  7. Open the project in Studio Pro and make commit from there so that the .gitignore file changes are also pushed to server.
  8. I have below version of Tortoise git installed on my machine.image.png

Thanks for a read out!

Posted
1 comments

Warning : the approach described here by Soumya Bindhani only works for MPRv1 file.

 

If you switched to MPRv2, you will not be able to open Studio Pro after following this process.

Workaround: switch back to MPRv1, rename your project and then switch again to MPRv2.

 

An idea is open to request a 'rename' option. You can find it here

Created