Github 上传项目

学习记录

创建新项目

创建新项目

在想要上传的文件夹内打开终端

初始化仓库

1
git init

将要提交的文件暂存到本地仓库

1
git add .

创建一个新的提交并添加提交消息

1
git commit -m "first commit"

重命名当前分支

1
git branch -M main

将本地 Git 仓库与远程仓库建立关联

1
git remote add origin https://github.com/用户名/项目名.git

将本地分支的提交推送到远程仓库

1
git push -u origin main

Github 上传项目
http://example.com/2024/01/01/Github-上传项目/
作者
hxiicle
发布于
2024年1月1日
许可协议