In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to use the local Git set of Pycharm version control". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use the local Git set of Pycharm version control.
1. Theme
Describes how to use a local Git set through Pycharm.
2. Preparatory work
(1) PyCharm version 2.7 or higher
(2) A project has been created
(3) the Git plug-in is available, and the corresponding executable file is correctly configured on the Git page page.
3. Create a Git set
Press Alt+ `to display the commonly used VCS command (or through the main menu VCS → VCS Operations Popup), and select the Create Git repository command:
Git installs the local version library by creating a .git folder under the parent directory. Here we choose to create a .git directory under the root directory:
4. Pycharm user interface changes
(1) Changes tool window window appears
(2) discoloration of Solver.py file name
This also means that version control has not been added to this new file (described later).
(3) Open the Settings dialog box (Ctrl+Alt+S), click Version Control, and find that the MySimplePythonApplication directory has been associated with Git:
5. Add version control to the file
Method put a file under version control, here is an example. Select the Solver.py file and press Ctrl+Alt+A.
The Solver.py file turns green, which means that version control has taken place, but it has not been managed:
6. Submit the local version library
Select the Solver.py file in the Changes tool window window, press Ctrl+K, enter information, and click Commit.
Open the Log tab tab of Changes tool window to view
7. View the current branch
There are two ways:
First, use the main menu command VCS → Git → Branches to view in the pop-up window:
Second, use the Git component on the status bar:
8. Change the main branch code
Take renaming as an example. Position the cursor over the discr symbol, press Shift+F6, and enter the new name discriminant.
Notice that the left slot produces the corresponding tag:
Click this tag, and Pycharm will pop up a window to remind you of the current changes. Press the Ctrl+K shortcut to update the code.
9. Create a new branch
Click the branch icon on the status bar and enter a name:
The new branch is now in the current Changes tool window window as a tab:
Next, create a second branch (Branch3) from the main branch.
10. Change the code in the new branch
Switch to Branch 1:
Position the cursor over the discriminant symbol, press Shift+F6, enter an abbreviation, such as dis, and then press Ctrl+K to host the changes.
Do the same for branch 2.
11. Merge branches
Only the current branch can be merged into other branches. Use the main menu commands of VCS → Git → Merge Changes:
Choose to accept these changes and host them, review them again, and find that they are more complex than before:
At this point, I believe you have a better understanding of "how to use the local Git set of Pycharm version control". 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.