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 > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how GIt is used in pyCharm. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
(1) installation and configuration of Git
1. The official website for downloading git,git is: https://git-scm.com/
1.1 Click install in the lower right corner, and the installation process continues to the next step.
1.2 after the download is complete, check whether the installation is successful. Open cmd, type git version, and check the current download version.
1.3 configure git, enter: git config-- global user.name "user name" in cmd
Git config-global user.email "user mailbox"
Enter: git config-- list to check whether the configuration is successful
(2) configure git in pycharm
Click file--- > settings, and then the figure shows:
(3) create a warehouse
Enter in the terminal of pycharm.
Method 1: manually create a directory name + git init
Method 2: git init directory name
Method 3: copy a library, open GitHub, find the library you need, click clone or download, and copy the link. Enter git clone + replication connection + directory name in pycharm to create the library.
(4) some basic operations
1.git status looks at the status of the library
two。 After you create a file, view it again.
3. Save a record: git add * (global) / git add file,txt (save file to staging area)
Git commit-m "remarks"
4. Check the saved record: git log
Note: garbled code appears, as shown below
5. Modify the contents of the file, save it again, and view it.
Note: the content is not complete, jk can be moved up and down
Press Q to quit.
6. Return the previously saved record: git checkout + serial number
Return to the previous record: git checkout-
View the specific operation content: git log-p
7. Add tags (default is recent, add tag): git tag-a tag signature-m "remarks"
Add the tag after the specified content: git tag-a signature-m "remarks" serial number
View tags: git show tag signature
Return to the previous version: git checkout signature
The tag compresses each submission into one line: git log-- oneline
Each submission is displayed: git log-- oneline-- all
Create branch: git branch branch name
Switch to a branch: git checkout branch name
Go back to the default branch: git checkout master
Picture shows all historical records: git log-- graph-- all-- oneline
Merge Branch: git merge Branch name
(5) establish a remote warehouse submission code
1. Log in to GitHub in pycharm
Steps for 2.Git SSH to create a Key:
a. Right click on the desktop to open Git Bash Here
b. Enter: cd ~ / .ssh/ (if "No such file or directory" appears, you need to create a ssh keys)
Git config-global user.name "give me a name"
Git config-global user.email "your mailbox"
Ssh-keygen-t rsa-C "your mailbox" three consecutive enter, set the password to empty
Note: there are no spaces between ssh-keygen
c. Find .ssh in disk C, the path is shown below, get id_rsa and id_rsa.pub, open id_rsa.pub with notepad, and copy the contents.
Note: delete known_hosts if there is any in it.
4. Open GitHub: https://gruxiatiithub.com
Then paste in the id_rsa.pub that you copied before.
5. Check whether it has been added successfully: github enter command: ssh git@github.com
Note: "Hi your name! You've successfully authenticated, but GitHub does not provide shel l access." Indicates that it has been added successfully
6. As shown in the figure:
Congratulations on your success!
7. Finally, there is the operation of git update library and clone library.
Thank you for reading! This is the end of the article on "how to use GIt in pyCharm". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.