GitHub新建仓库提交代码
背景
想把我电脑上很鸡肋的代码存到GitHub上,同时学习一下GitHub的使用。
新建仓库

Repository name仓库名
Description简单描述
Public默认选择这个
Private因为这个收费

最终我们新建的仓库地址为
https://github.com/hugboyget/windows.git
安装GitHub的客户端Git
下载
拷贝仓库保存到本地
git clone https://github.com/hugboyget/windows.git

此时D盘下就多了一个windows文件夹
查看仓库
cd windows
dir /b

接着我们可以直接对windows中的代码文件进行添加\修改
上传
合并修改
git add.
注: "." 表示将当前目录下所有改动的文件夹及文件添加到版本管理器,当前目录为
d:\windows
描述
git commit -m "Description about this post"
远程提交
git push origin master
或
git push origin main
刷新github界面就可以看到新上传的文件和改动了

参考
https://blog.csdn.net/weixin_42029738/article/details/81255389
常用命令
配置
git config --global user.name "hugboy"
git config --global user.email "hugboy@example.com"
git config --list
________________________________________________________
Every good deed you do will someday come back to you.
Love you,love word !

浙公网安备 33010602011771号