How does jetbrains use git to upload code

I wrote that phpstorm uses Git before , but the writing was too messy, so I rewrote it. I usually use PHPstorm and Webstorm of the jetbrains family as the main development tools.
PHPstorm, Webstorm and other jetbrains family software use git operations almost exactly the same.

First of all, you must install Git on your computer and configure the secret key (if you use the ssh protocol). You can refer to the third section of Linux installation git and key addition : generate and add keys.
Take webstorm as an example: the demo address
of this article

1. Pull the warehouse code

1. Create a new warehouse (if there is an existing warehouse, please ignore it)

​​​​2.insert image description here
Pull the warehouse code
insert image description here
and paste the warehouse address:
insert image description here

2. Upload code

Code change area color description:
insert image description here

1. New file upload
Create a new test.js file. Files that are not added to the warehouse will be displayed in red. If they are
insert image description here
added to the warehouse, they will become light green. If they are not added to the warehouse, these files will not be pushed when the code is submitted. go up.
insert image description here
2. Submit the code
insert image description here
The shortcut key is: Ctrl+K
insert image description here
insert image description here
if you just want to save it temporarily, you can select commit first, and then push when you want to push. The shortcut key is: Ctrl+shift+k
if you want to submit after committing, select Commit and Push
insert image description here
push. After that, the code warehouse can be seen own code
insert image description here

3. Modify the code

1. Modify the code
If it is a new line of code, the color is light green
insert image description here
If it is to modify the original existing line of code, it will become light blue, and the color of the file with the modified code is also blue
insert image description here
2. Rename the file
insert image description here
insert image description here

4. Update project code

Shortcut key: Ctrl+T
or insert image description here
can pull the latest code version in the remote warehouse to the local branch
insert image description here

5. Rollback

1. Local one-line recall
Click the color area of ​​the number of rows on the left with the mouse, and select the rollback line.
insert image description here
2. Batch recall on this page
Click the recall symbol/shortcut key on the right: ctrl+alt+z, Mac keyboard alt is the option key to
insert image description here
withdraw all, and then select directly in the pop-up rollback
insert image description hereIf batch selective operations are required, double-click to change the file
insert image description here
3. Roll back the warehouse code At this time, the code you want to
roll back is already in the warehouse . Select the git history
flag . You can roll back the local code 2. The code history of the git warehouse . Right-click to select git history. This file git history: project all history: you can also choose to specify the branch, specify the submitter and other filter conditions 3 .Comparing the code with other branches of the git repository
insert image description here
insert image description here



insert image description here

insert image description here



insert image description here


insert image description here

insert image description here

6. Recent Changes

This is the latest local change
Shortcut alt+shift+cmac: option+shift+c
This is very useful
insert image description here
Other non-Git operations will be updated later

Guess you like

Origin blog.csdn.net/sinat_15955423/article/details/107389469