Working with a local Git server for version control (2023)

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 Enterprise edition
  • GitLab EE
  • GitLab CE
  • 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:

  1. 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.

  2. Enter the repository linkApp-Repository-adresone clickConnect. You now have the option to change the folder where the application is downloaded:

  3. ClickAgree.

  4. I amRegisterEnter your credentials in the dialog box:

  5. 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:

  1. Open from prepayment.

  2. ActivatePrive serverPress the radio button and enter the link to the repository.

  3. ClickConnect.

  4. 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:

  1. To electLocally on the hard diskPossibility.

  2. 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 and .gitignore files) or the upload will fail.

To upload your app:

  1. Open the app in Studio Pro and go toVersion control > Upload to version control server:

  2. I amUpload to version control serverSelect the dialog boxPrive server.

  3. To electGitas a private server type (if you have both).SubversionIGitactivated insideform of preferences).

  4. Enter the link to the repository where you want to upload this application and clickAgree:

    You may be prompted to log in to the server, depending on whether you have logged in before and whether you want to stay logged in.

  5. 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:

  1. Once the app is open, go toFile > Export Application Package.

  2. 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:

  3. OfProgressA pop-up window appears. After the process is completed, you can close the applicationStudioPro:

  4. Now you can import the package again and upload it from there to your private Git server. To goduration>Import the application package:

  5. Once the file browser dialog opens, navigate to the location where you save the file.mpkfile during the export process.

  6. I amImport the application packageSelect the dialog boxPrive serveroption in itWhere should we store your app?Section.

  7. I amType privateserveroption, select itGit(If you have bothSubversionIGitactivated insidepreferencesform).

  8. 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:

  9. 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.


How to use git version control locally? ›

Start a Local repository
  1. Create a directory to contain the project.
  2. Go into the new directory.
  3. Type git init.
  4. Write some code.
  5. Type git add to add the files.
  6. Type git commit.
Aug 7, 2019

Can I use git locally only? ›

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? ›

  1. To push the main repo, you first have to add the remote server to Git by running git remote add <url> . ...
  2. To finally push the repo, run git push -u origin <branch-name> ...
  3. That's how you push the main branch for the first time. ...
  4. To confirm that the branch has been pushed, head over to GitHub and click the branches drop-down.
Sep 9, 2022

What are the three main local areas in Git? ›

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.

What is the difference between git clone and git remote origin? ›

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? ›

Here is the command to delete branch locally:
  1. git branch -d "branch name"
  2. git branch --delete <branch>
  3. git branch -D <branchName>
  4. git push origin -d "branch name"
  5. git push <remote_name> --delete <branch_name>
  6. git push <remote_name> :<branch_name>
  7. git branch -d <BranchName>
  8. git branch -D <branchName>
Nov 27, 2022

How to push files from local to git? ›

Using GitHub Desktop to PUSH to your local content to GitHub.
  1. Click "Set up in a Desktop"
  2. Cloning in a GitHub Desktop.
  3. Copy all the required files from your local computer into the clone folder on your computer.
  4. Move to GitHub Desktop and commit to master.
  5. Publish branch in GitHub Desktop to upload your all files to GitHub.

How to pull all branches from git to local? ›

How to Pull All Branches in Git
  1. Git installed (see how to install Git on Ubuntu, macOS, Windows, CentOS 7, or CentOS 8). ...
  2. In Git bash, clone the remote repository using the git clone command and the URL that you copied. ...
  3. After cloning the repository, check the branches available in the local and remote repositories.
Mar 16, 2023

How to check all local git branches? ›

List All Branches
  1. To see local branches, run this command: git branch.
  2. To see remote branches, run this command: git branch -r.
  3. 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? ›

Top 10 Alternatives to Git
  • Azure DevOps Server.
  • Helix Core.
  • AWS CodeCommit.
  • Subversion.
  • Rational ClearCase.
  • Plastic SCM.
  • Mercurial.
  • Micro Focus AccuRev.

What is local version control system? ›

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.

Which is better Git or SVN? ›

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? ›

Start a Local repository
  1. Create a directory to contain the project.
  2. Go into the new directory.
  3. Type git init.
  4. Write some code.
  5. Type git add to add the files.
  6. Type git commit.
Aug 7, 2019

What are the three basic types of version control systems? ›

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? ›

Initializing a Git repository
  1. Open Terminal .
  2. Navigate to the root directory of your project.
  3. Initialize the local directory as a Git repository. By default, the initial branch is called main . ...
  4. Add the files in your new local repository. ...
  5. Commit the files that you've staged in your local repository.

How to check git branches locally? ›

List All Branches
  1. To see local branches, run this command: git branch.
  2. To see remote branches, run this command: git branch -r.
  3. To see all local and remote branches, run this command: git branch -a.

How to check local git version? ›

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? ›

How to Install and Use Git on Windows
  1. Steps For Installing Git for Windows. Download Git for Windows. Extract and Launch Git Installer. ...
  2. How to Launch Git in Windows. Launch Git Bash Shell. Launch Git GUI.
  3. Connecting to a Remote Repository. Create a Test Directory. Configure GitHub Credentials.
Jan 8, 2020

How to setup local git server in Windows? ›

Summary: Steps For Git Installation on Windows 10
  1. Download and install Git.
  2. Git bash interface.
  3. Basic Git commands.
  4. Create a local repository.
  5. Connect to the remote repository.
  6. Push the file to GitHub.
May 5, 2023

How to compare two git branches locally? ›

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? ›

To fetch all branches from all remotes, you should run the git fetch command with --all option:
  1. git fetch --all.
  2. git pull --all.
  3. git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done.

How to check different versions in git? ›

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.

How to check local commit files in git? ›

Commit Files
  1. Enter this command: git commit -m "Message that describes what this change does" ...
  2. Check the status again by running this command: git status.
  3. If all changes have been committed, and there are no untracked files, it should say: nothing to commit, working tree clean.


Top Articles
Latest Posts
Article information

Author: Jerrold Considine

Last Updated: 12/20/2023

Views: 5849

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jerrold Considine

Birthday: 1993-11-03

Address: Suite 447 3463 Marybelle Circles, New Marlin, AL 20765

Phone: +5816749283868

Job: Sales Executive

Hobby: Air sports, Sand art, Electronics, LARPing, Baseball, Book restoration, Puzzles

Introduction: My name is Jerrold Considine, I am a combative, cheerful, encouraging, happy, enthusiastic, funny, kind person who loves writing and wants to share my knowledge and understanding with you.