1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# 初始化本地仓库
git init
# 添加当前目录下的所有文件到git仓库中
git add .
# 提交初始版本信息
git commit -m "提交信息"
# 将本地仓库关联到远程仓库
git remote add origin https://github.com/yourusername/repository.git
# 如果仓库地址有误,可以重新设置
git remote set-url origin https://github.com/yourusername/repository.git
# 测试远程连接
git ls-remote origin
# 推送更新到远程仓库
git push origin master
|