In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use gui in git". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use gui in git.
Gui in git means "visualization tool" and is the default graphical tool of git. It is an interface display format for people to communicate with computers, allowing users to use input devices such as the mouse to manipulate icons or menu options on the screen.
This article operating environment: Windows7 system, Git2.30.0 version, Dell G3 computer.
What does gui mean in git
This article introduces the use of Git Gui, the official visualization tool of Git, and tries to show both pictures and texts as far as possible, so that all friends who have explored Git can get started quickly and use Git for project development.
1. Create a new version library locally
First of all, we open the Git GUI is such an interface, select the first item, create a new version library.
Then select the project path where you need to version management, and I chose a LoginDemo project.
When you create a version library, you can see an extra .git folder under the path of the project (invisible if hidden files are set)
In Git Gui, if the Unstaged Changes (uncached changes) contains files, click Stage Changed first, add the uncached changes to the cache, and then click Commit;, otherwise you need to click Rescan to scan the changed files in the project. Note: the submission description must be filled in, otherwise it cannot be submitted.
After the submission is successful, we can see the history of our submission in Repository- > Visualize All Branches History (this is submitted locally rather than to the remote server). At this point, the local version library is created successfully.
two。 Submit the project to the remote
In the previous step, we have set up a version library locally using Git, and then we need to submit the project to a remote server so that colleagues or other partners can participate in the development. General open source projects use github as a remote server. In fact, after the local resume version library, you can upload it directly by clicking push. However, we have not contacted the local Git with github and set up a security protocol.
First, we need to have our own github account, and then create a new repository on github, which is also called LoginDemo (which can be different from the local project name).
In Git Gui, select Remote- > add to add the remote server. There are two ways to enter the remote server information. Enter the https address or ssh address. It is recommended to use the ssh method corresponding to the https and ssh addresses of the github project.
1.https address
This way you need to enter your github account and password, which means that you can only work on your own projects in this way.
2.ssh address
This way requires authorization settings. In the menu bar of Git Gui, click Help- > Show SSH key- > Generate SSH KEY to create the key.
Then add it to the Personal settings of github. Title is optional and can be distinguished by Home,company and so on.
Add remote server information.
Next, we can directly click push in Git Gui to submit to the remote client, refresh the github, and we can see that the project is already in repository.
3. Download updates remotely
Imagine that many people are involved in the development of the project, and everyone only push to remote, regardless of the progress of other members, this development model is undoubtedly problematic. The best thing we can do is to fetch the current progress from the remote every time push is remote, and then push it to the remote after merge with our current project progress. Open Git Gui and select Remote- > Fetch from- > LoginTest in the menu bar to update from the remote server to the local, but not yet merged with your current project.
4. Merge to resolve conflicts
After the remote fetch, select Merge- > Local Merge of Git Gui to merge and select Tracking Branch.
If there is a local method called findUser, and the name of the method is changed in the remote server, for example, it becomes findPassword, the merge encounters a conflict, and you can right-click the blank part and choose to keep the local version or the remote version to merge (the green code in the figure represents the conflicting part).
5. Clone the project on github to local
Choose to clone the existing version library in the main interface of Git Gui.
Source Location is the address of the project in github, as in the second part (submitting the project to remote), you can choose the https address or ssh address, and Target Directory is the path where the project is stored locally. Click Clone and successfully clone the project locally from github.
At this point, I believe you have a deeper understanding of "how to use gui in git". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.