Creating, maintaining and collaborating (Github World)

Biswarup Ghoshal
5 min readFeb 25, 2020

--

This article describes the way two or more people collaborate in a project shared in Github. For this, I choose a live project in Github with path https://github.com/biswarup81/prescription.git

Step-1 : Identify the branch. The figure below shows the number of branch. Let us assume that the branch which we’ve identified is prescription-manas-billing.

Once you’ve identified the proper branch name, then you’ll be downloading the complete code-base into your local system. See step-2 for details.

Step-2: Download and run Git from https://git-scm.com/downloads into your local machine (Laptop/Desktop)

Now let us download and run the Bitnami Wamp Server for the purpose of running and testing the application which is created using PHP and MySQL application. Download and run the installer from

https://bitnami.com/stack/wamp/installer

Step-3: Now go to the local folder WAMP_INSTALL_LOC>\apache2\htdocs\ and execute the command (shown in the picture in the left). git clone <GITHUB_REPO> - -branch <BRANCH_NAME> . Once the command is executed properly

then you can find the folder prescription created inside htdocs. Next step will be to download Eclipse and configure this project.

Step-4: Download and run Eclipse 19–20 version. Installer location is https://www.eclipse.org/downloads/

Once you download, run and open Eclipse. You can choose the default workspace or can create a new workspace. In any case, once you’ve opened Eclipse, you need to install PHP and Git plugin. Go to Eclipse Marketplace and search for Git. Choose EGit- Git Integration for Eclipse 5.5.1 and click on install. Install only the required components.

Once installed, Eclipse will be restarted. Now, search PHP for PHP plugin installation. Choose PHP Development Tools 6.2 and install the plugin in the same way you did for Git. Once installed, Eclipse will be restarted.

Now, eclipse is ready for opening the projects.

Step-5 : Open Eclipse and Choose File -> Open Projects from File System. This will ask you to choose the directory. Copy and paste the directory WAMP_INSTALL_LOC>\apache2\htdocs\prescription. This will create a PHP project in Eclipse.

Step-6 : After completion of the steps mentioned from 1 till 5, your environment is now ready for your work and you can now collaborate. If you’re changing the files (i.e you’re contributing in the project), then in order to commit those changes, first right click on the project -> Team -> Add to Index.

Once you’ve added this to the index, it now ready to commit to the branch. In order to commit your changes, first you change the perspective in Eclipse. Change the perspective of Eclipse to Git.

Once the perspective has been changed to Git, your can see the the files which had been altered is in the Staged Area. In order to commit the changes in your branch. Click on Commit and Push button in the right bottom corner. This concludes your changes in the git repository. This is always recommended that, you need to carry out your unit testing before you push your changes to the branch.

Figure showing the area to Commit and Push

This is always important to keep track of the methods which you’re performing. Using the common artifacts of yourself is an art. You should always keep track of your own resources.

Step-7: To run the application in the local environment, you first open phpmyadmin through browser. http://localhost:<PORT>/phpmyadmin (usually apache will be running in port 80, so no need to specify any port). It open the login page. login using your root user to mysql which you’ve provided while installing the WAMP server.

Once into the database section, create a database called prescription. Choose the database prescription and import the file <APACHE_INSTALL_ROOT>/htdocs/prescription/setup/myepresc_sroy.sql

This will create multiple tables and related views.

Step-8: Now test your application by running http://localhost/prescription

Prescription — Home Page

Step-9 (Optional): Now, you want to deploy your changes in your Google Cloud App Engine. For that first, create a Compute Engine Instance in Google Cloud and SSH to the Virtual Machine. Below screen shows you the SSH terminal for the Virtual Server instance. Let us conclude this article over here. We can continue speaking about the CI/CD framework later.

Google Cloud VM Instances and SSH Terminal

Goto the site mentioned below for more details -https://docs.microsoft.com/en-us/azure/devops/repos/git/gitworkflow?view=azure-devops

--

--

Biswarup Ghoshal
Biswarup Ghoshal

Written by Biswarup Ghoshal

MDM Architect | Blogger | DJ | Musician

No responses yet