In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to use Git under IntelliJ IDEA. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Author | J'KYO
Link | cnblogs.com/pejsidney/p/9199115.html
1. Introduction to Git
Git is a popular distributed version management system at present. It has two sets of version libraries, the local library and the remote library, which do not affect each other without operations such as merge and deletion. As a result, almost all of its operations are performed locally, so it is still possible to submit code and switch branches when the network is cut off. Git also uses the SHA-1 hash algorithm to ensure that it can be detected immediately when the file becomes incomplete and the disk is corrupted resulting in data loss.
The basic workflow of git:
Git clone: clone the remote Master branch code to the local warehouse git checkout: cut out the branch to develop git add: add the file to the library tracking area git commit: submit the code changed in the library tracking area to the local code library git push: submit the code from the local warehouse to the remote warehouse Git branch main branch master branch: store the code ready for deployment in the production environment: the branch that stores the latest development results When the code is stable enough, it can be merged into the master branch. Auxiliary branch feature branch: develop new features and use, eventually merge into the develop branch or discard the release branch: make minor bug fixes, prepare for the release of the various instructions required hotfix branch: code emergency fix work 2, Git under IntelliJ IDEA use 2.1, configure Git local installation of git under IntelliJ IDEA, and configure reasonable SSH key Please see here IntelliJ IDEA- > Performance- > Version Control- > git fill in the path of the executable file where you installed git into Path to Git executable, and click Test to test it.
2.2, git cloneVCS- > Git- > Clone
Enter your remote warehouse address and click to test whether the address is correct
Git checkout has a branch management of git in the lower right corner of IntelliJ IDEA, click. Choose the branch you need and checkout it out.
When checkout comes out, the current branch will be displayed at the bottom. Where 1 shows the version in the local warehouse and 2 is the version in the remote warehouse
Click the VCS of the down arrow in the upper right corner of the IDE to synchronize the changes to the branch locally
2.4.The git diff selects the file to be compared in the local changes, and then right-click show diff to view the changes in the file. Or choose Revert to discard changes to the file
2.5. Git log Select Log under Version Control to view the submission history
2.6.The project imported by git commit by default has been added to the library tracking area by git add. Casually modify the pom.xml file, and the modified file will be displayed under local changes in Version Control.
Click the VCS and git commit of the up arrow in the upper right corner of IDE, write a log and submit it to the local code library
2.7. git pushVCS- > Git- > Push submit local code to the remote repository
After reading the above, do you have any further understanding of how to use Git under IntelliJ IDEA? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.