Article directory
1. Download Git on your computer
Download from git official website: Git - Downloads (git-scm.com)
Just download and install.
2. Configure Git
Right mouse button to enter the Git command line
(1) Set the user name and set the user account (need to be your own registered Github account)
git config --global user.name "user_name"#(自己的用户名)
git config --global user.email "[email protected]"(自己Github账号邮箱)
(2) Configure password-free login (your own Github account mailbox)
ssh-keygen -t ed25519 -C "[email protected]"
或
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Enter directly
Then C:\Users\【用户名】\.ssh\id_rsa.pub
use Notepad to open id_rsa.pub
the file, select all to copy the content inside, and then open your own Github
3. Upload the Github repository
Create a new warehouse
There is also an example of uploading a file here
The local Git submission is used here, and the steps are as follows:
#到对应的文件夹下,鼠标右键打开Git的命令窗口
#1.先初始化
git init
#2.添加所有文件至暂存区
git add .
#3.提交本地仓库
git commit -m "first commit"
#4.设置分支
git branch -M main
#5.本地仓库和远程仓库建立连接
git remote add origin https://github.com/QHCV/flask.git
#6.提交远程仓库
git push -u origin main
Submitted successfully