Moving changes between multiple Git repositories
In a multi-developer environment, you would then send your changes to a remote central Git repository and receive any new changes down to your local Git repository. For the purpose of demonstrating the OpenInsight push/pull process, we are going to simulate receiving changes from another copy of OpenInsight. In the example below, the same Git environment has been set up on another workstation which we will Remote Desktop into. The system we have been working on is called win10test3 and the system on the Remote Desktop is called win10test4. The flow of events are as follows:
• Clone the repository from win10test3 to win10test4
• Create a new program on workstation win10test4 in the STAR application.
• Commit the new changes to win10test4’s local Git repository.
• From the win10test3 workstation in the STAR application pull the Git repository changes from win10test4 into the win10test3’s local Git repository.
• Pull the changes from win10test3’s local Git repository into the STAR application on win10test3.
On the win10test4 workstation we will clone the Git repository from win10test3
Figure 43a – GitEx Clone on win10test4 from C:\Revsoft
Figure 43b – GitEx Clone – cloning Git repository from win10test3
Figure 43c – GitEx Clone
Figure 44 – Git settings on win10test4
Using the System Editor, we will create a new stored procedure called A_NEW_STOREDPROC on win10test4.
Figure 45 – Creation of a new stored procedure using the System Editor
From the OpenInsight IDE, select Git, Git Commit… OpenInsight has automatically pushed the newly created stored procedure into the local Git repository on win10tes4.
Figure 46 – Selecting Git Commit from the Git Menu
The Commit window will appear again and look like this.
Figure 47 – The Git Commit window
As you can see, Git knows that there is a new file called A_NEW_STOREDPROC.txt. We will now stage this item and commit to the local repository on win10test4. After clicking the Commit button these changes are now committed to the Git repository. The next step from the win10test3 workstation is to “pull” these changes from the local Git repository on win10test4 into the local Git repository on win10test3.
Figure 48 – Staging and committing items on win10test4
Figure 49 – Results of Git Commit on win10test4