記錄一下終端提交代碼的幾行命令舷丹,不知道是不是由于老了涮毫,始終記不住了
1痹籍、git init
2呢铆、git add .
3、git commit -m "添加你的注釋,一般是一些更改信息"
4蹲缠、git remote add origin HTTPS鏈接
5棺克、git remote
6、git pull origin master
7线定、git push origin master
其中第六步可能出現(xiàn)的錯誤
D1315969-20E4-4A1F-9156-E87475C5A6C7.png
執(zhí)行
沒有設(shè)置默認分支
git pull origin master --allow-unrelated-histories
或者
設(shè)置了默認分支
git pull --allow-unrelated-histories
8娜谊、git tag 設(shè)置標簽
// 提交到本地
git tag -a '0.0.1' -m '設(shè)置版本'
git tag '0.0.1'
// 查看設(shè)置的版本
git tag
// 提交到倉庫
git push --tags
// 提交指定的版本到倉庫
git push origin 0.0.2
9、git log 查看地址值
10斤讥、git status 查看本地修改的代碼類
11纱皆、git tag -d 0.0.1 刪除本地當前版本
12、git push origin :0.0.1 刪除倉庫的版本周偎,中間有: