Steps to upload your own project to Github open source

First of all, you have to download git. This Baidu can directly search the official website to download the corresponding version. For example, mine is windows64 bit

1. Then register your own account on github: log in to Github, find the icon in the upper right corner, open and click Settings inside, then select SSH and GPG KEYS inside, click New SSH key in the upper right corner, and then fill in the Title. Then copy the content in id_rsa.pub just now to the Key content box under Title, and finally click Add SSH key, thus completing the encryption of the SSH Key. The specific steps can also be seen below:

 2. Create a warehouse on github, this part can refer to this xd blog (4 messages) How to create your own warehouse on GitHub? _Brother Nie's Blog-CSDN Blog_github Create Warehouse

3. Open git bash cd to enter the folder of the project you want to upload

Enter the following commands in sequence:

git init    //把这个文件夹变成Git可管理的仓库
git status   //查看当前目录状态
git add .       //注意点号不能省,默认把当前目录所有文件上传
git commit -m "first commit"    //引号内为注释
//git remote add origin后面加你github上创建的仓库链接
git remote add origin https://github.com/nykcrystal/QtSightness.git
git push -u origin master   //关联好之后我们就可以把本地库的所有内容推送到远程仓库(也就是Github)上
-u是因为第一次上传仓库是空的,后续上传不用加-u

As shown in the picture, the upload is successful

 

Guess you like

Origin blog.csdn.net/weixin_53206200/article/details/124636513