
1.本地初始化git目录
1 |
git init |
2.新建文件并且写入内容
1 |
touch a.txt |
3.添加到暂存区
1 |
git add . |
4.添加远程仓库
1 |
git remote add origin https://github.com/xxx/test.git |
5.本地仓库也远程仓库关联
1 |
git branch --set-upstream-to=origin/master master |
6.拉取远程仓库内容到本地
1 |
git pull origin master --allow-unrelated-histories |
7.将最新的内容推送到远程仓库
1 |
git push |




近期评论