Add a local project to a Git repository using Git
introduction
This blog post uses Git to add a local project to a Git repository, and implement crawling and push
Git installation and little turtle installation and configuration
Set up a Git account
View current Git account name
git config user.name
View current Git mailbox
git config user.email
Set Git account name
git config --global user.name = "王会称"
Set up Git mailboxes
git config --global user.email "[email protected]"
Check again if the setting is successful
Enter the git global configuration file to modify
vi ~/.gitconfig
Log in to Gitee's official website and register an account
If there is no account, you need to create a new one and bind the specified email address
New warehouse
New warehouse
Click Create to create successfully
Git generates SSH public key
Open Git Bash
Enter the following command in the Git window to generate the secret key
ssh-keygen -t rsa -C "[email protected]"
Enter all the way, and finally check the generated secret key
Generated successfully
Gitee configure public key
Direct access: https://gitee.com/profile/sshkeys to enter the key configuration interface
Configured successfully
Configure the turtle SSH address
Right click on TortoiseGit --> select Settings
Configure ssh.exe in Git file usr
Apply and OK to exit
Crawl the project
Click Clone, select SSH, copy the git address
Clone the file to the specified folder, right-click and select Git Clone
Select ok to clone the project
Successfully crawled project
Push the local project to the Git repository
Create a new test .txt file in the crawled project
Commit to submit the code first, and then push the code to the Gitee repository
Fill in the submitted document information
Click Commit&Push to submit the code
Submitted successfully
Open Gitee to view submitted files
Click to view the contents of the file
The submission is successful, the test is successful~
Delete Gitee repository
Enter the warehouse, select Manage, find Delete warehouse
Click delete, delete items need to be careful, once deleted, can not be retrieved, delete the warehouse need to verify the account password
successfully deleted
This is the end of this article. If this article is helpful to you, please give it to the blogger (Like, Favorite, Comment)
If you encounter any technical problems, you can comment in the comment area or privately message me, and it will be solved in place!
If you encounter any technical problems, you can comment in the comment area or privately message me, and it will be solved in place!
Thanks for your support~