The following tutorial column of phpstorm will introduce the steps and methods of configuring git in phpstorm through pictures and texts. I hope it will be helpful to friends in need!
1. Installation
Double-click
After selecting the installation location, continue all the way to next until the end , click to complete;
2. Initialize local Git information
First go to https://gitee.com/ to register an account. It is recommended (must) to use valid registration here. After the registration is completed , if you use qq mailbox to register, the following code is:
git config --global user.name "1729950804"
git config --global user.email "1729950804@qq .com"
3. Configure PhpStorm to support Git
##4. Checkout the project code online
# #Note:
If the Git address starts with HTTPS (such as https://code.aliyun.com/feidu/testDemo.git), you need to enter the account password when connecting;
Git If the address starts with git@ (such as git@code.aliyun.com:feidu/testDemo.git), you need to configure the local Git ssh certificate first when connecting.
======== ==========================================
Configure local Git's SSH certificate: for reference only
Open Git Bash, enter: ssh-keygen -t rsa -C "1729950804@qq.com",
Note: The one between the double quotes is in For the account information registered on the code hosting platform, it is generally recommended (required) to use the email
Common operation methods1. Update
2. Daily modificationGit submission of local code online is divided into three steps:
1), AddAfter modifying a file or adding a new file, you need to right-click the file and select GitAdd to add the file from the workspace to the temporary storage area2), Commit
Save locally modified files to the local repository. In layman’s terms, it means submitting the file you just added from the temporary storage area to the local repository.3 ), Push
is to submit all local modifications (limited to files after commit) to online
3. File status
white : Since the last pull, the file has not been modified locally
Light blue: The file has been modified locally
Red: The file has been newly added locally and the Add command has not been executed
Be sure to remember add --> Commit --> Push. Only after completing these three steps can the code be truly submitted online! ! !
The above is the detailed content of Graphical explanation of how to configure git in phpstorm. For more information, please follow other related articles on the PHP Chinese website!