Use Git and Github in Php Storm PDF

Title Use Git and Github in Php Storm
Author Rose Norman
Course Info Resources & Services
Institution Indiana University - Purdue University Indianapolis
Pages 15
File Size 1.2 MB
File Type PDF
Total Downloads 93
Total Views 181

Summary

instructions for info 210 course work...


Description

Use Git and Github in PhpStorm For version control purpose, PhpStorm provides several features. We are going to use Git and Github to pursue this goal.

1. Install Git to your computer

2. Setup GitHub and connect it via PhpStorm

1. Open "Settings" > "Version Control" > "Github". In this page, add your Github account in this box. If you don't have a Github account, you need to create one first.

2. Finally, you will your Github account connects to the PhpStorm

3. Share the project on Github 1. Find the "vcs" tab from the top tool bar and then click"Share Project on Github"

You will see the next page like the below, it's better to check the box of "Private" unless you want to make your personal project to be accessible to the public.

Then, you will see a new window that asks you what files need to commit on the remote Github repository. For this case, I select all files. In the "Commit message" box, you need to add some comments to remind what change you made in the project. For the first time, the default message is "Initial commit". Then click "Add".

Now, if you go to your Github web, you will see a new project that you added is already there.

2. Commit your work into the remote project copy. Every time, after you finish your work, and test it. You need commit and push your work to the remote project repository. Find the "Git" from the top tool bar. (From now, there is no "VCS".)

For example, I changed my index.php that is in "api" folder. I added an echo statement that I want to commit my work.

When you click the "Commit", you will see the page below. You need to add a comment in the "Commit Message" box. You are optional to add "Author:" or do some "Before Commit" check like check TODO, etc. And then click "Commit" button.

 Then you find the "Git" > Push from the top tool bar. Now, you see the page that asks you to finally push the changed file to the remote project.

Now, if you check your Github for the index.php, you will see the change is in there.

Actually, this "commit" then "push" can be done when you click the "Commit" button from the last step. You can click the down arrow in the "Commit" button, there is "Commit and Push" option.

This will perform asking commit then asking push in a sequence.

For example, I made another echo message, and this time I use "Commit and Push". Check your Github, you will see the new change is added.

3. Share the project with your teammembers. Go to your Github project page, find the "Settings" and then "Manage access" Here, you can manage "Who has access" if you accidently make your project public before. You can change it to the private now. From the "Add people" you can add your team members to access your project.

Add their username or email that uses in their Github account to find them and add.



Go to the project page, and find the "Code" dropdown list. You can copy the Clone url and send to team members.

 For team member, they can "Clone" the project by clicking "Get from VCS"

!(C:\Users\ranchang\AppData\Roaming\Typora\typora-user-images\image20211020163931450.png)...


Similar Free PDFs