Mendix 10 is currently in beta. For details on Mendix 9.24 LTS, see the Studio Pro 9 manual.
Last modified: June 5, 2023
1. Introduction
As Mendix applications are developed, changes to those applications are stored in the version control system. This system is calledTeam serverand is part of the Mendix platform. This means that the application files are stored in Mendix's online environment. For more information seeVersion Control Reference Guide.
While most Mendix developers are encouraged to use Team Server, you may prefer to store your application files on a system managed by your organization. Mendix is used for version controlGit. This document describes how to work with the Git version control system.
This document does not describe how to set up a Git server from scratch. This is usually done by your company's IT department.
2 requests
Make sure you meet the following conditions:
- Make sure you have the correct server. We currently only support Git private servers. For more information seePrepare your repositorySection.
- You have a Mendix application without version management. For more information seeCreate an applicationSection.
3 supported authentication mechanisms
We currently only support HTTP Basic authentication for Git providers. Most providers do this in the form of Personal Access Tokens (PATs).
To use a PAT (or other equivalent) you must specify it in thepasswordField when Studio Pro requires version control server credentials:
4 Layout of the environment
This section describes how to configure a Git version of an application in Studio Pro. You need a Git server and a non-versioned Mendix application.
4.1 Prepare your repository
Mendix supports several Git providers below. For more information about a specific provider and its requirements, seeSystem requirements.
Studio Pro can use the following Git server providers:
- Azure DevOps-server
- Azure Repositories
- GitHub.com
- GitHub Enterprise edition
- GitLab.com
- GitLab EE
- GitLab CE
- BitBucket.org
- BitBucket-server
- BitBucket-datacenter
You must create a private repository with your chosen service provider and create a personal access token (PAT) to grant access to it. PAT is used as password.
To communicate with this Studio Pro private repository, you need a link to the repository and a PAT.
4.2 Prepare Studio Pro for Git
To use Git locally, you must configure the name and email values that will be used to identify your commit in Studio Pro by going toedit>preferences>version management:
Studio Pro is now set up to support Git.
4.3 Create an application
Create a version app in Studio Pro:
Once the application is built, you can upload it to your private Git repository. For more information about uploading, seeUpload to a private Git serversection below.
4.4 Downloading from Private Repository
Now that you have the Git application on your server, you can download it to another directory, or one of your team members can download it to their computer. Follow the steps below:
Under, underVersion control > Download from version control server, to electPrive serveroption and enter the URL of your repository that contains the application you want to download. If you're not sure which URL to use, you can find this information on your Git server.
Enter the repository linkApp-Repository-adresone clickConnect. You now have the option to change the folder where the application is downloaded:
ClickAgree.
I amRegisterEnter your credentials in the dialog box:
Enter username (can be anything but blank) and use previously saved PAT as password.
The application is downloaded and can be used with version control.
4.5 Open an existing Git application
There are several ways to open the Git Mendix application if you have Studio ProGit support enabled.
4.5.1 List of recent applications
In yoursRecent ApplicationsYou can click on the app name in the list and the app will open.
4.5.2 Recent Applications menu.
Under, underduration>Recent Applications, you can select and open the application.
4.5.3 Open the application form
Ofopen the applicationThe form is available in two different locations:
- open the applicationbutton onMy appstab
- under the menuFile > Open application
In the form, there are two ways to open a Git application, by opening from a previous checkout or by opening locally on disk:
For the previous payment method, do the following:
Open from prepayment.
ActivatePrive serverPress the radio button and enter the link to the repository.
ClickConnect.
Once you have checked the application at least once, you can select one of the existing disk locations and the application will open (here with two previous checks):
For the previous local disk method, do the following:
To electLocally on the hard diskPossibility.
In the file browser dialog, navigate to the folder containing your application and double-click it.mprfile (or select it and clickOpen):
4.6 Transfer to a private Git server
Once you have an unversioned app, you can upload it to your private team server.
The repository must be completely empty (including the README.md and .gitignore files) or the upload will fail.
To upload your app:
Open the app in Studio Pro and go toVersion control > Upload to version control server:
I amUpload to version control serverSelect the dialog boxPrive server.
To electGitas a private server type (if you have both).SubversionIGitactivated insideform of preferences).
Enter the link to the repository where you want to upload this application and clickAgree:
You can see the loading process in theUpload the project to the team serverpopup window.
The application has been uploaded successfully. On your private server, you can check if the application is now in the selected repository:
4.7 Moving a Subversion Application to Git
If you already have an existing version application (using Subversion) that you want to upload to your private Git server instead, you can export it, then re-import it and upload it to your server. Follow the steps below:
Once the app is open, go toFile > Export Application Package.
I amExport application packagesIn the dialog box, navigate to the location you want to save.mpk(Mendix package) file or accept the default location, the newPACKAGEA folder in the root of the application folder. Make a note of this location, you will need it later. You can also rename the file.mpkfile (egMijnGitApp.mpk) and the app will be named like this after you import it and upload it to the Git server:
OfProgressA pop-up window appears. After the process is completed, you can close the applicationStudioPro:
Now you can import the package again and upload it from there to your private Git server. To goduration>Import the application package:
Once the file browser dialog opens, navigate to the location where you save the file.mpkfile during the export process.
I amImport the application packageSelect the dialog boxPrive serveroption in itWhere should we store your app?Section.
I amType privateserveroption, select itGit(If you have bothSubversionIGitactivated insidepreferencesform).
Enter the link to the private repository in the address text box and clickAgree. Remember the repositorymust be completely empty, ofStudioProI can't load the app on it:
ClickAgree.
After completing the import process, your previous Subversion application now has a version with Git.
Note that your previous request still exists.StudioProjust make an unversioned copy and put it on your private git server. So in yourRecent Applicationslist, you still see both:
5 Read more
- Version Control Reference Guide
- Team server
- Reference guide to uploading to a version control server
Return message
Was this page helpful?
I am glad to hear that! Thank you for your answer.
I'm sorry to hear that. I prayTell us how we can improve.
FAQs
How to use git version control locally? ›
- Create a directory to contain the project.
- Go into the new directory.
- Type git init.
- Write some code.
- Type git add to add the files.
- Type git commit.
Git is a tool for revision control. GitHub is an online service that allows you to store, manage, and share Git repositories in the cloud. You can use Git with online services other than GitHub, with an in-house server, or on your local computer without any server at all. First, let's look at what Git is.
Is git a local version control system? ›Git is a Version Control System or VCS. VCS is basically software designed to record changes within one or more files over time. It allows us to undo or to cancel all made or pending changes within one or more files. If we're working on a project with many files, VCS enables us to control the whole project.
What is the benefit of using a version control system such as git? ›Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members.
Can we use git version control offline? ›Unlike SVN, Git can work offline, allowing your team to continue working without losing features if they lose connection.
What is the difference between a local repository and remote repository when using git? ›Local repositories reside on the computers of team members. In contrast, remote repositories are hosted on a server that is accessible for all team members - most likely on the internet or on a local network.
What is the difference between local git and GitHub? ›Git is a version control system that allows developers to track changes in their code. GitHub is a web-based hosting service for git repositories. In simple terms, you can use git without Github, but you cannot use GitHub without Git.
What is the difference between local and remote git file? ›The local branch exists on the local machine and can be seen only by the local user. The remote branch is a branch on a remote location. Sometimes, you want to know what files are changed between the local and remote repositories.
Which git command cannot be run locally? ›When I talk to colleagues about Git, I tell them, that there are only three Git commands that cannot be executed without going to a remote repository once a local repo is initialized (assuming that origin is not on the local machine, of course): git fetch. git pull. git push.
Should I use Git for version control? ›Git is a version control system that you download onto your computer. It is essential that you use Git if you want to collaborate with other developers on a coding project or work on your own project.
What are the 2 types of version control? ›
There are two types of version control: centralized and distributed.
Is Git the best version control? ›In essence, VSS was a shield on top of a shared file folder. Microsoft discontinued VSS in 2005, coincidently the same year as the first release of Git. While technology has shifted and improved quite a bit since then git has come out as the dominant choice for version control systems.
What are limitations of version control system? ›The biggest disadvantage is the single point of failure embedded within the centralized server. If the remote server goes down, then no one can work on the code or push changes. The lack of offline access means that any disruption can significantly impact code development and even result in code loss.
How to manage version control in Git? ›Click Code and copy the HTTPS link. Now open RStudio, click File/ New Project/ Version control/ Git and paste the HTTPS link from the Github repository into the Repository URL: field. Select a folder on your computer - that is where the “local” copy of your repository will be (the online one being on Github).
What is the first rule of version control? ›Commit changes atomically. Commit files with a single purpose. Write good commit messages. Avoid broken builds.
Can you run your own Git server? ›Git allows you to host your own Git server. Instead of setting up your own server, you can also use a hosting service. The most popular Git hosting sites are GitHub and Bitbucket. Both offer free hosting with certain limitations.
How does Git allow developers to work offline? ›Git is a distributed version control system, which means that a local clone of the project is a complete version control repository. These fully functional local repositories make it easy to work offline or remotely.
Do you need wifi for Git? ›Git is installed and maintained on your local system (rather than in the cloud) and gives you a self-contained record of your ongoing programming versions. It can be used completely exclusive of any cloud-hosting service — you don't even need internet access, except to download it.
Does GitHub work at a local or remote level? ›While Git works on your local machine, GitHub is a remote storage facility on the web for all your coding projects.
How to connect local branch to remote branch in git? ›In order to push your branch to another remote branch, use the “git push” command and specify the remote name, the name of your local branch as the name of the remote branch. As an example, let's say that you have created a local branch named “my-feature”.
How do I push a local branch to a remote? ›
- To push the main repo, you first have to add the remote server to Git by running git remote add <url> . ...
- To finally push the repo, run git push -u origin <branch-name> ...
- That's how you push the main branch for the first time. ...
- To confirm that the branch has been pushed, head over to GitHub and click the branches drop-down.
This leads us to the three main sections of a Git project: the working tree, the staging area, and the Git directory. The working tree is a single checkout of one version of the project.
What are the 3 local areas associated with a Git repository? ›Working Area, Staging Area, Repository - Git In-depth | Frontend Masters.
Does Git store all branches locally? ›Git stores all references under the . git/refs folder and branches are stored in the directory .
How do I know if local git is connected to remote? ›Check your Remote
To check the configuration of the remote server, run the git remote command. The git remote command allows accessing the connection between remote and local. If you want to see the original existence of your cloned repository, use the git remote command.
GIT REMOTE add just creates an entry in your git configuring that specifies a name for a particular URL. You must have an existing git report to use this. GIT CLONE creates a new git repository by copying an existing one located at the URL you specify.
How do I remove a file from local and remote branch in git? ›- git branch -d "branch name"
- git branch --delete <branch>
- git branch -D <branchName>
- git push origin -d "branch name"
- git push <remote_name> --delete <branch_name>
- git push <remote_name> :<branch_name>
- git branch -d <BranchName>
- git branch -D <branchName>
- Click "Set up in a Desktop"
- Cloning in a GitHub Desktop.
- Copy all the required files from your local computer into the clone folder on your computer.
- Move to GitHub Desktop and commit to master.
- Publish branch in GitHub Desktop to upload your all files to GitHub.
- Git installed (see how to install Git on Ubuntu, macOS, Windows, CentOS 7, or CentOS 8). ...
- In Git bash, clone the remote repository using the git clone command and the URL that you copied. ...
- After cloning the repository, check the branches available in the local and remote repositories.
- To see local branches, run this command: git branch.
- To see remote branches, run this command: git branch -r.
- To see all local and remote branches, run this command: git branch -a.
What is the most used version control system? ›
Git. Without a doubt, Git is the single most popular version control system in use. Not only does Git offer the strongest feature set for developers, but it also has the most reliable workflow and is supported by the most third-party platforms on the market.
What happens if you don't use version control? ›If you don't have version control software capable of restoring old versions, all of your team's work can be lost. File versioning tools not only make it clear which file is the latest version but also allow you to go back and restore previous versions.
What version control system is alternative to Git? ›- Azure DevOps Server.
- Helix Core.
- AWS CodeCommit.
- Subversion.
- Rational ClearCase.
- Plastic SCM.
- Mercurial.
- Micro Focus AccuRev.
Local Version Control Systems: It is one of the simplest forms and has a database that kept all the changes to files under revision control. RCS is one of the most common VCS tools. It keeps patch sets (differences between files) in a special format on disk.
What is the difference between Git and other version control? ›The primary difference between Git vs SVN is their approach to code management. Git has a distributed architecture, while SVN is centralized. Both are enterprise-grade version control systems, with Git positioned as more of a source code management (SCM) tool while SVN acts more as a revision control system.
What is the example of local VCS? ›For Example Distributed VCS is Git/Mercurial/Bazaar or Darcs. For this time, there is 2 kind of Distributed VCS that used, the first one is Feature Branch Development, and the second one is Trunk Branch Development.
Why is version control hard? ›It is inflexible. It is difficult to make copies of the repository. Sure you can create as many working copies as you need, but making a complete copy of the repository including the history is difficult. It's also not possible to merge from repository to repository (at least not easily or without additional tools).
How to check Git version control? ›You can check your current version of Git by running the git --version command in a terminal (Linux, macOS) or command prompt (Windows). If you don't see a supported version of Git, you'll need to either upgrade Git or perform a fresh install, as described below.
Is Git version control tool big and slow? ›Git limitations
Git repositories become so slow and unwieldy as they grow that the largest practical size is broadly recognized as being between 1GB and 2GB of content.
Advantages of Git Over SVN
The ability to work locally and offline is one major advantage to Git. SVN requires contributors to be connected to the main repository server, which essentially eliminates working offline. Git also outperforms SVN when it comes to merging and conflict resolution.
Is Git centralized or distributed? ›
The most popular of these options is Git, which is an open-source distributed system that is used for any size software project.
How the versioning is done in Git? ›Git can be enabled on a specific folder/directory on your file system to version files within that directory (including sub-directories). In git (and other version control systems) terms, this “tracked folder” is called a repository (which formally is a specific data structure storing versioning information).
Is Git a version control system? ›Git is a Distributed VCS, a category known as DVCS, more on that later. Like many of the most popular VCS systems available today, Git is free and open source.
How Git is distributed version control? ›Git is a distributed version control system known for its speed, workflow compatibility, and open source foundation. With Git, software teams can experiment without fearing that they'll create lasting damage to the source code. Teams using a Git repository can tackle projects of any size with efficiency and speed.
How to use Git for local version control? ›- Create a directory to contain the project.
- Go into the new directory.
- Type git init.
- Write some code.
- Type git add to add the files.
- Type git commit.
A Version Control System (VCS) is a tool or application that is used to track, monitor, and manage changes made to the source code. There are three main types of VCSs: Local Version Control Systems (LVCSs), Centralized Version Control Systems (CVCSs), and Distributed Version Control Systems (DVCSs).
What are the best practices of Git? ›To get the most out of Git, it's important to follow best practices when working with the tool. Some best practices include keeping commits small and focused, using clear and concise commit messages, branching frequently to isolate changes and reduce the risk of conflicts, and using pull requests for code reviews.
How to setup Git repository locally? ›- Open Terminal .
- Navigate to the root directory of your project.
- Initialize the local directory as a Git repository. By default, the initial branch is called main . ...
- Add the files in your new local repository. ...
- Commit the files that you've staged in your local repository.
- To see local branches, run this command: git branch.
- To see remote branches, run this command: git branch -r.
- To see all local and remote branches, run this command: git branch -a.
You can check your current version of Git by running the git --version command in a terminal (Linux, macOS) or command prompt (Windows).
How to install Git repo locally? ›
- Steps For Installing Git for Windows. Download Git for Windows. Extract and Launch Git Installer. ...
- How to Launch Git in Windows. Launch Git Bash Shell. Launch Git GUI.
- Connecting to a Remote Repository. Create a Test Directory. Configure GitHub Credentials.
- Download and install Git.
- Git bash interface.
- Basic Git commands.
- Create a local repository.
- Connect to the remote repository.
- Push the file to GitHub.
In order to compare two branches easily, you have to use the “git diff” command and provide the branch names separated by dots. Using this command, Git will compare the tip of both branches (also called the HEAD) and display a “diff” recap that you can use to see modifications.
How to pull all remote branches into local git? ›- git fetch --all.
- git pull --all.
- git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done.
The git diff command displays the differences between files in two commits or between a commit and your current repository. You can see what text has been added to, removed from, and changed in a file. By default, the git diff command displays any uncommitted changes to your repository.
Does git pull update local files? ›Using git pull
The git pull command fetches and downloads content from the remote repository and integrates changes into the local repository. It is used to update the current local working branch and the remote tracking branches for other branches.
- Enter this command: git commit -m "Message that describes what this change does" ...
- Check the status again by running this command: git status.
- If all changes have been committed, and there are no untracked files, it should say: nothing to commit, working tree clean.